
<!doctype html>
<html lang="en" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      
      
      
      
        <link rel="prev" href="../06_Servlet%E5%8F%8AFilter%E5%9F%BA%E7%A1%80%E5%AE%9E%E9%AA%8C/index.html">
      
      
      <link rel="icon" href="../../assets/images/favicon.png">
      <meta name="generator" content="mkdocs-1.4.2, mkdocs-material-9.1.3">
    
    
      
        <title>07 Spring Boot综合实验 - 基于WEB的应用程序开发-实验指导书</title>
      
    
    
      <link rel="stylesheet" href="../../assets/stylesheets/main.c4a75a56.min.css">
      
        
        <link rel="stylesheet" href="../../assets/stylesheets/palette.a0c5b2b5.min.css">
      
      

    
    
    
      
        
        
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
        <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
      
    
    
      <link rel="stylesheet" href="../../assets/stylesheets/extra.css">
    
    <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
    
      

    
    
    
  </head>
  
  
    
    
      
    
    
    
    
    <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="purple" data-md-color-accent="">
  
    
    
      <script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
    
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" for="__drawer"></label>
    <div data-md-component="skip">
      
        
        <a href="#springboot" class="md-skip">
          Skip to content
        </a>
      
    </div>
    <div data-md-component="announce">
      
    </div>
    
    
      

  

<header class="md-header md-header--shadow" data-md-component="header">
  <nav class="md-header__inner md-grid" aria-label="Header">
    <a href="../../index.html" title="基于WEB的应用程序开发-实验指导书" class="md-header__button md-logo" aria-label="基于WEB的应用程序开发-实验指导书" data-md-component="logo">
      
  
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg>

    </a>
    <label class="md-header__button md-icon" for="__drawer">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
    </label>
    <div class="md-header__title" data-md-component="header-title">
      <div class="md-header__ellipsis">
        <div class="md-header__topic">
          <span class="md-ellipsis">
            基于WEB的应用程序开发-实验指导书
          </span>
        </div>
        <div class="md-header__topic" data-md-component="header-topic">
          <span class="md-ellipsis">
            
              07 Spring Boot综合实验
            
          </span>
        </div>
      </div>
    </div>
    
      <form class="md-header__option" data-md-component="palette">
        
          
          <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="purple" data-md-color-accent=""  aria-label="夜间模式"  type="radio" name="__palette" id="__palette_1">
          
            <label class="md-header__button md-icon" title="夜间模式" for="__palette_2" hidden>
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5c-.84 0-1.65.15-2.39.42L12 2M3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29L3.34 7m.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14L3.36 17M20.65 7l-1.77 3.79a7.023 7.023 0 0 0-2.38-4.15l4.15.36m-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29L20.64 17M12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44L12 22Z"/></svg>
            </label>
          
        
          
          <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="teal" data-md-color-accent=""  aria-label="日间模式"  type="radio" name="__palette" id="__palette_2">
          
            <label class="md-header__button md-icon" title="日间模式" for="__palette_1" hidden>
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3 3.19.09m3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95 2.06.05m-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31Z"/></svg>
            </label>
          
        
      </form>
    
    
    
    
  </nav>
  
</header>
    
    <div class="md-container" data-md-component="container">
      
      
        
          
        
      
      <main class="md-main" data-md-component="main">
        <div class="md-main__inner md-grid">
          
            
              
              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    


<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
  <label class="md-nav__title" for="__drawer">
    <a href="../../index.html" title="基于WEB的应用程序开发-实验指导书" class="md-nav__button md-logo" aria-label="基于WEB的应用程序开发-实验指导书" data-md-component="logo">
      
  
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg>

    </a>
    基于WEB的应用程序开发-实验指导书
  </label>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../index.html" class="md-nav__link">
        首页
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../01_Html%E5%9F%BA%E7%A1%80/index.html" class="md-nav__link">
        01 Html基础实验
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../02_CSS%E5%9F%BA%E7%A1%80/index.html" class="md-nav__link">
        02 CSS基础实验
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../03_Javascript%E5%9F%BA%E7%A1%80/index.html" class="md-nav__link">
        03 Javascript基础
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../03_Javascript%E9%AB%98%E7%BA%A7%E5%AE%9E%E9%AA%8C/index.html" class="md-nav__link">
        03 Javascript高级实验
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../04_jQuery/index.html" class="md-nav__link">
        04 jQuery
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../04_Bootstrap/index.html" class="md-nav__link">
        04 Bootstrap
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../../04_Vue.js%E5%9F%BA%E7%A1%80/index.html" class="md-nav__link">
        04 Vue.js
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../05_%E6%9C%8D%E5%8A%A1%E7%AB%AF%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/index.html" class="md-nav__link">
        05 服务端开发环境搭建
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../05_JSP%E7%9A%84%E9%9A%90%E5%90%AB%E5%AF%B9%E8%B1%A1%E5%AE%9E%E9%AA%8C/index.html" class="md-nav__link">
        05 JSP的隐含对象实验
      </a>
    </li>
  

    
      
      
      

  
  
  
    <li class="md-nav__item">
      <a href="../06_Servlet%E5%8F%8AFilter%E5%9F%BA%E7%A1%80%E5%AE%9E%E9%AA%8C/index.html" class="md-nav__link">
        06 Servlet及Filter基础实验
      </a>
    </li>
  

    
      
      
      

  
  
    
  
  
    <li class="md-nav__item md-nav__item--active">
      
      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
      
      
        
      
      
        <label class="md-nav__link md-nav__link--active" for="__toc">
          07 Spring Boot综合实验
          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <a href="index.html" class="md-nav__link md-nav__link--active">
        07 Spring Boot综合实验
      </a>
      
        

  

<nav class="md-nav md-nav--secondary" aria-label=" ">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
       
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#1" class="md-nav__link">
    1 实验类型
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#2" class="md-nav__link">
    2 实验目的
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#3" class="md-nav__link">
    3 实验要求
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#4" class="md-nav__link">
    4 实验环境
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#5" class="md-nav__link">
    5 实验步骤
  </a>
  
    <nav class="md-nav" aria-label="5 实验步骤">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#spring-boot" class="md-nav__link">
    创建Spring Boot项目
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_1" class="md-nav__link">
    配置
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    创建学生表
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#crud" class="md-nav__link">
    实现CRUD操作
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_3" class="md-nav__link">
    测试
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_4" class="md-nav__link">
    学生表
  </a>
  
    <nav class="md-nav" aria-label="学生表">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_5" class="md-nav__link">
    学生表增
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_6" class="md-nav__link">
    学生表删
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_7" class="md-nav__link">
    学生表改
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_8" class="md-nav__link">
    学生表查
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_9" class="md-nav__link">
    课程表
  </a>
  
    <nav class="md-nav" aria-label="课程表">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_10" class="md-nav__link">
    课程表增
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_11" class="md-nav__link">
    课程表删
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_12" class="md-nav__link">
    课程表改
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_13" class="md-nav__link">
    课程表查
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_14" class="md-nav__link">
    学生选课表
  </a>
  
    <nav class="md-nav" aria-label="学生选课表">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_15" class="md-nav__link">
    学生选课表增
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_16" class="md-nav__link">
    学生选课表删
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_17" class="md-nav__link">
    学生选课表改
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_18" class="md-nav__link">
    学生选课表查
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
      
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

  

<nav class="md-nav md-nav--secondary" aria-label=" ">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
       
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#1" class="md-nav__link">
    1 实验类型
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#2" class="md-nav__link">
    2 实验目的
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#3" class="md-nav__link">
    3 实验要求
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#4" class="md-nav__link">
    4 实验环境
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#5" class="md-nav__link">
    5 实验步骤
  </a>
  
    <nav class="md-nav" aria-label="5 实验步骤">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#spring-boot" class="md-nav__link">
    创建Spring Boot项目
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_1" class="md-nav__link">
    配置
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_2" class="md-nav__link">
    创建学生表
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#crud" class="md-nav__link">
    实现CRUD操作
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_3" class="md-nav__link">
    测试
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_4" class="md-nav__link">
    学生表
  </a>
  
    <nav class="md-nav" aria-label="学生表">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_5" class="md-nav__link">
    学生表增
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_6" class="md-nav__link">
    学生表删
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_7" class="md-nav__link">
    学生表改
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_8" class="md-nav__link">
    学生表查
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_9" class="md-nav__link">
    课程表
  </a>
  
    <nav class="md-nav" aria-label="课程表">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_10" class="md-nav__link">
    课程表增
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_11" class="md-nav__link">
    课程表删
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_12" class="md-nav__link">
    课程表改
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_13" class="md-nav__link">
    课程表查
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
        <li class="md-nav__item">
  <a href="#_14" class="md-nav__link">
    学生选课表
  </a>
  
    <nav class="md-nav" aria-label="学生选课表">
      <ul class="md-nav__list">
        
          <li class="md-nav__item">
  <a href="#_15" class="md-nav__link">
    学生选课表增
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_16" class="md-nav__link">
    学生选课表删
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_17" class="md-nav__link">
    学生选课表改
  </a>
  
</li>
        
          <li class="md-nav__item">
  <a href="#_18" class="md-nav__link">
    学生选课表查
  </a>
  
</li>
        
      </ul>
    </nav>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          
            <div class="md-content" data-md-component="content">
              <article class="md-content__inner md-typeset">
                
                  


<h1 id="springboot">SpringBoot综合实验</h1>
<h2 id="1">1 实验类型</h2>
<p>验证型，2学时，必选实验</p>
<h2 id="2">2 实验目的</h2>
<p>掌握Spring Boot项目的开发流程</p>
<p>熟悉Spring MVC、MyBatis、Freemarker等框架的使用</p>
<p>熟悉第三方依赖的引入方法</p>
<h2 id="3">3 实验要求</h2>
<p>使用SSM(Spring、Spring MVC、Mybatis)实现学生表的CRUD操作</p>
<h2 id="4">4 实验环境</h2>
<p>Windows7+，JDK 20，Tomcat 10.1.9，STS-4.17.2，<code>Microsoft Edge/Chrome/Firefox</code>等浏览器，Visual Studio Code(安装REST Client插件)，联网电脑</p>
<h2 id="5">5 实验步骤</h2>
<h3 id="spring-boot">创建Spring Boot项目</h3>
<ol>
<li>
<p>打开STS4，选择File -&gt; New -&gt; Spring Starter Project</p>
</li>
<li>
<p>输入项目名称，选择Maven项目，选择Spring Boot版本，选择Web、MySQL、MyBatis、Freemarker等依赖，点击Finish按钮创建项目</p>
</li>
<li>
<p>打开<code>pom.xml</code>，手工添加以下依赖：</p>
</li>
</ol>
<table>
<thead>
<tr>
<th>依赖名</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>spring-boot-starter-validation</td>
<td>有效性校验</td>
</tr>
<tr>
<td>validation-api</td>
<td>有效性校验</td>
</tr>
<tr>
<td>poi</td>
<td>POI操作Excel</td>
</tr>
<tr>
<td>poi-ooxml</td>
<td>POI操作Excel</td>
</tr>
<tr>
<td>sqlite-jdbc</td>
<td>Sqlite驱动</td>
</tr>
</tbody>
</table>
<details class="tip">
<summary>pom.xml</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/pom.xml</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">  1</a></span>
<span class="normal"><a href="#__codelineno-0-2">  2</a></span>
<span class="normal"><a href="#__codelineno-0-3">  3</a></span>
<span class="normal"><a href="#__codelineno-0-4">  4</a></span>
<span class="normal"><a href="#__codelineno-0-5">  5</a></span>
<span class="normal"><a href="#__codelineno-0-6">  6</a></span>
<span class="normal"><a href="#__codelineno-0-7">  7</a></span>
<span class="normal"><a href="#__codelineno-0-8">  8</a></span>
<span class="normal"><a href="#__codelineno-0-9">  9</a></span>
<span class="normal"><a href="#__codelineno-0-10"> 10</a></span>
<span class="normal"><a href="#__codelineno-0-11"> 11</a></span>
<span class="normal"><a href="#__codelineno-0-12"> 12</a></span>
<span class="normal"><a href="#__codelineno-0-13"> 13</a></span>
<span class="normal"><a href="#__codelineno-0-14"> 14</a></span>
<span class="normal"><a href="#__codelineno-0-15"> 15</a></span>
<span class="normal"><a href="#__codelineno-0-16"> 16</a></span>
<span class="normal"><a href="#__codelineno-0-17"> 17</a></span>
<span class="normal"><a href="#__codelineno-0-18"> 18</a></span>
<span class="normal"><a href="#__codelineno-0-19"> 19</a></span>
<span class="normal"><a href="#__codelineno-0-20"> 20</a></span>
<span class="normal"><a href="#__codelineno-0-21"> 21</a></span>
<span class="normal"><a href="#__codelineno-0-22"> 22</a></span>
<span class="normal"><a href="#__codelineno-0-23"> 23</a></span>
<span class="normal"><a href="#__codelineno-0-24"> 24</a></span>
<span class="normal"><a href="#__codelineno-0-25"> 25</a></span>
<span class="normal"><a href="#__codelineno-0-26"> 26</a></span>
<span class="normal"><a href="#__codelineno-0-27"> 27</a></span>
<span class="normal"><a href="#__codelineno-0-28"> 28</a></span>
<span class="normal"><a href="#__codelineno-0-29"> 29</a></span>
<span class="normal"><a href="#__codelineno-0-30"> 30</a></span>
<span class="normal"><a href="#__codelineno-0-31"> 31</a></span>
<span class="normal"><a href="#__codelineno-0-32"> 32</a></span>
<span class="normal"><a href="#__codelineno-0-33"> 33</a></span>
<span class="normal"><a href="#__codelineno-0-34"> 34</a></span>
<span class="normal"><a href="#__codelineno-0-35"> 35</a></span>
<span class="normal"><a href="#__codelineno-0-36"> 36</a></span>
<span class="normal"><a href="#__codelineno-0-37"> 37</a></span>
<span class="normal"><a href="#__codelineno-0-38"> 38</a></span>
<span class="normal"><a href="#__codelineno-0-39"> 39</a></span>
<span class="normal"><a href="#__codelineno-0-40"> 40</a></span>
<span class="normal"><a href="#__codelineno-0-41"> 41</a></span>
<span class="normal"><a href="#__codelineno-0-42"> 42</a></span>
<span class="normal"><a href="#__codelineno-0-43"> 43</a></span>
<span class="normal"><a href="#__codelineno-0-44"> 44</a></span>
<span class="normal"><a href="#__codelineno-0-45"> 45</a></span>
<span class="normal"><a href="#__codelineno-0-46"> 46</a></span>
<span class="normal"><a href="#__codelineno-0-47"> 47</a></span>
<span class="normal"><a href="#__codelineno-0-48"> 48</a></span>
<span class="normal"><a href="#__codelineno-0-49"> 49</a></span>
<span class="normal"><a href="#__codelineno-0-50"> 50</a></span>
<span class="normal"><a href="#__codelineno-0-51"> 51</a></span>
<span class="normal"><a href="#__codelineno-0-52"> 52</a></span>
<span class="normal"><a href="#__codelineno-0-53"> 53</a></span>
<span class="normal"><a href="#__codelineno-0-54"> 54</a></span>
<span class="normal"><a href="#__codelineno-0-55"> 55</a></span>
<span class="normal"><a href="#__codelineno-0-56"> 56</a></span>
<span class="normal"><a href="#__codelineno-0-57"> 57</a></span>
<span class="normal"><a href="#__codelineno-0-58"> 58</a></span>
<span class="normal"><a href="#__codelineno-0-59"> 59</a></span>
<span class="normal"><a href="#__codelineno-0-60"> 60</a></span>
<span class="normal"><a href="#__codelineno-0-61"> 61</a></span>
<span class="normal"><a href="#__codelineno-0-62"> 62</a></span>
<span class="normal"><a href="#__codelineno-0-63"> 63</a></span>
<span class="normal"><a href="#__codelineno-0-64"> 64</a></span>
<span class="normal"><a href="#__codelineno-0-65"> 65</a></span>
<span class="normal"><a href="#__codelineno-0-66"> 66</a></span>
<span class="normal"><a href="#__codelineno-0-67"> 67</a></span>
<span class="normal"><a href="#__codelineno-0-68"> 68</a></span>
<span class="normal"><a href="#__codelineno-0-69"> 69</a></span>
<span class="normal"><a href="#__codelineno-0-70"> 70</a></span>
<span class="normal"><a href="#__codelineno-0-71"> 71</a></span>
<span class="normal"><a href="#__codelineno-0-72"> 72</a></span>
<span class="normal"><a href="#__codelineno-0-73"> 73</a></span>
<span class="normal"><a href="#__codelineno-0-74"> 74</a></span>
<span class="normal"><a href="#__codelineno-0-75"> 75</a></span>
<span class="normal"><a href="#__codelineno-0-76"> 76</a></span>
<span class="normal"><a href="#__codelineno-0-77"> 77</a></span>
<span class="normal"><a href="#__codelineno-0-78"> 78</a></span>
<span class="normal"><a href="#__codelineno-0-79"> 79</a></span>
<span class="normal"><a href="#__codelineno-0-80"> 80</a></span>
<span class="normal"><a href="#__codelineno-0-81"> 81</a></span>
<span class="normal"><a href="#__codelineno-0-82"> 82</a></span>
<span class="normal"><a href="#__codelineno-0-83"> 83</a></span>
<span class="normal"><a href="#__codelineno-0-84"> 84</a></span>
<span class="normal"><a href="#__codelineno-0-85"> 85</a></span>
<span class="normal"><a href="#__codelineno-0-86"> 86</a></span>
<span class="normal"><a href="#__codelineno-0-87"> 87</a></span>
<span class="normal"><a href="#__codelineno-0-88"> 88</a></span>
<span class="normal"><a href="#__codelineno-0-89"> 89</a></span>
<span class="normal"><a href="#__codelineno-0-90"> 90</a></span>
<span class="normal"><a href="#__codelineno-0-91"> 91</a></span>
<span class="normal"><a href="#__codelineno-0-92"> 92</a></span>
<span class="normal"><a href="#__codelineno-0-93"> 93</a></span>
<span class="normal"><a href="#__codelineno-0-94"> 94</a></span>
<span class="normal"><a href="#__codelineno-0-95"> 95</a></span>
<span class="normal"><a href="#__codelineno-0-96"> 96</a></span>
<span class="normal"><a href="#__codelineno-0-97"> 97</a></span>
<span class="normal"><a href="#__codelineno-0-98"> 98</a></span>
<span class="normal"><a href="#__codelineno-0-99"> 99</a></span>
<span class="normal"><a href="#__codelineno-0-100">100</a></span>
<span class="normal"><a href="#__codelineno-0-101">101</a></span>
<span class="normal"><a href="#__codelineno-0-102">102</a></span>
<span class="normal"><a href="#__codelineno-0-103">103</a></span>
<span class="normal"><a href="#__codelineno-0-104">104</a></span>
<span class="normal"><a href="#__codelineno-0-105">105</a></span>
<span class="normal"><a href="#__codelineno-0-106">106</a></span>
<span class="normal"><a href="#__codelineno-0-107">107</a></span>
<span class="normal"><a href="#__codelineno-0-108">108</a></span>
<span class="normal"><a href="#__codelineno-0-109">109</a></span>
<span class="normal"><a href="#__codelineno-0-110">110</a></span>
<span class="normal"><a href="#__codelineno-0-111">111</a></span>
<span class="normal"><a href="#__codelineno-0-112">112</a></span>
<span class="normal"><a href="#__codelineno-0-113">113</a></span>
<span class="normal"><a href="#__codelineno-0-114">114</a></span>
<span class="normal"><a href="#__codelineno-0-115">115</a></span>
<span class="normal"><a href="#__codelineno-0-116">116</a></span>
<span class="normal"><a href="#__codelineno-0-117">117</a></span>
<span class="normal"><a href="#__codelineno-0-118">118</a></span>
<span class="normal"><a href="#__codelineno-0-119">119</a></span>
<span class="normal"><a href="#__codelineno-0-120">120</a></span>
<span class="normal"><a href="#__codelineno-0-121">121</a></span>
<span class="normal"><a href="#__codelineno-0-122">122</a></span>
<span class="normal"><a href="#__codelineno-0-123">123</a></span>
<span class="normal"><a href="#__codelineno-0-124">124</a></span>
<span class="normal"><a href="#__codelineno-0-125">125</a></span>
<span class="normal"><a href="#__codelineno-0-126">126</a></span>
<span class="normal"><a href="#__codelineno-0-127">127</a></span>
<span class="normal"><a href="#__codelineno-0-128">128</a></span>
<span class="normal"><a href="#__codelineno-0-129">129</a></span>
<span class="normal"><a href="#__codelineno-0-130">130</a></span>
<span class="normal"><a href="#__codelineno-0-131">131</a></span>
<span class="normal"><a href="#__codelineno-0-132">132</a></span>
<span class="normal"><a href="#__codelineno-0-133">133</a></span>
<span class="normal"><a href="#__codelineno-0-134">134</a></span>
<span class="normal"><a href="#__codelineno-0-135">135</a></span>
<span class="normal"><a href="#__codelineno-0-136">136</a></span>
<span class="normal"><a href="#__codelineno-0-137">137</a></span>
<span class="normal"><a href="#__codelineno-0-138">138</a></span>
<span class="normal"><a href="#__codelineno-0-139">139</a></span>
<span class="normal"><a href="#__codelineno-0-140">140</a></span>
<span class="normal"><a href="#__codelineno-0-141">141</a></span>
<span class="normal"><a href="#__codelineno-0-142">142</a></span>
<span class="normal"><a href="#__codelineno-0-143">143</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<a id="__codelineno-0-2" name="__codelineno-0-2"></a><span class="nt">&lt;project</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">&quot;http://maven.apache.org/POM/4.0.0&quot;</span>
<a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="w">  </span><span class="na">xmlns:xsi=</span><span class="s">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span>
<a id="__codelineno-0-4" name="__codelineno-0-4"></a><span class="w">  </span><span class="na">xsi:schemaLocation=</span><span class="s">&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</span><span class="nt">&gt;</span>
<a id="__codelineno-0-5" name="__codelineno-0-5"></a><span class="w">  </span><span class="nt">&lt;modelVersion&gt;</span>4.0.0<span class="nt">&lt;/modelVersion&gt;</span>
<a id="__codelineno-0-6" name="__codelineno-0-6"></a><span class="w">  </span><span class="nt">&lt;parent&gt;</span>
<a id="__codelineno-0-7" name="__codelineno-0-7"></a><span class="w">    </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-8" name="__codelineno-0-8"></a><span class="w">    </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-starter-parent<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-9" name="__codelineno-0-9"></a><span class="w">    </span><span class="nt">&lt;version&gt;</span>3.0.6<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-10" name="__codelineno-0-10"></a><span class="w">    </span><span class="nt">&lt;relativePath</span><span class="w"> </span><span class="nt">/&gt;</span><span class="w"> </span><span class="cm">&lt;!-- lookup parent from repository --&gt;</span>
<a id="__codelineno-0-11" name="__codelineno-0-11"></a><span class="w">  </span><span class="nt">&lt;/parent&gt;</span>
<a id="__codelineno-0-12" name="__codelineno-0-12"></a><span class="w">  </span><span class="nt">&lt;groupId&gt;</span>xust<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-13" name="__codelineno-0-13"></a><span class="w">  </span><span class="nt">&lt;artifactId&gt;</span>Stu<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-14" name="__codelineno-0-14"></a><span class="w">  </span><span class="nt">&lt;version&gt;</span>0.0.1-SNAPSHOT<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-15" name="__codelineno-0-15"></a><span class="w">  </span><span class="nt">&lt;name&gt;</span>Stu<span class="nt">&lt;/name&gt;</span>
<a id="__codelineno-0-16" name="__codelineno-0-16"></a><span class="w">  </span><span class="nt">&lt;description&gt;</span>Stu<span class="nt">&lt;/description&gt;</span>
<a id="__codelineno-0-17" name="__codelineno-0-17"></a><span class="w">  </span><span class="nt">&lt;properties&gt;</span>
<a id="__codelineno-0-18" name="__codelineno-0-18"></a><span class="w">    </span><span class="nt">&lt;java.version&gt;</span>17<span class="nt">&lt;/java.version&gt;</span>
<a id="__codelineno-0-19" name="__codelineno-0-19"></a><span class="w">  </span><span class="nt">&lt;/properties&gt;</span>
<a id="__codelineno-0-20" name="__codelineno-0-20"></a><span class="w">  </span><span class="nt">&lt;dependencies&gt;</span>
<a id="__codelineno-0-21" name="__codelineno-0-21"></a><span class="w">    </span><span class="cm">&lt;!-- Starter for building MVC web applications using FreeMarker views --&gt;</span>
<a id="__codelineno-0-22" name="__codelineno-0-22"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-23" name="__codelineno-0-23"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-24" name="__codelineno-0-24"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-starter-freemarker<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-25" name="__codelineno-0-25"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-26" name="__codelineno-0-26"></a><span class="w">    </span><span class="cm">&lt;!-- Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat</span>
<a id="__codelineno-0-27" name="__codelineno-0-27"></a><span class="cm">    as the default embedded container --&gt;</span>
<a id="__codelineno-0-28" name="__codelineno-0-28"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-29" name="__codelineno-0-29"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-30" name="__codelineno-0-30"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-starter-web<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-31" name="__codelineno-0-31"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-32" name="__codelineno-0-32"></a><span class="w">    </span><span class="cm">&lt;!-- 有效性校验 --&gt;</span>
<a id="__codelineno-0-33" name="__codelineno-0-33"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-34" name="__codelineno-0-34"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-35" name="__codelineno-0-35"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-starter-validation<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-36" name="__codelineno-0-36"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-37" name="__codelineno-0-37"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-38" name="__codelineno-0-38"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>javax.validation<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-39" name="__codelineno-0-39"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>validation-api<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-40" name="__codelineno-0-40"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>2.0.1.Final<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-41" name="__codelineno-0-41"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-42" name="__codelineno-0-42"></a><span class="w">    </span><span class="cm">&lt;!-- MyBatis Spring Boot Starter --&gt;</span>
<a id="__codelineno-0-43" name="__codelineno-0-43"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-44" name="__codelineno-0-44"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.mybatis.spring.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-45" name="__codelineno-0-45"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>mybatis-spring-boot-starter<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-46" name="__codelineno-0-46"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>3.0.1<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-47" name="__codelineno-0-47"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-48" name="__codelineno-0-48"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-49" name="__codelineno-0-49"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.mybatis.spring.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-50" name="__codelineno-0-50"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>mybatis-spring-boot-starter-test<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-51" name="__codelineno-0-51"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>3.0.1<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-52" name="__codelineno-0-52"></a><span class="w">      </span><span class="nt">&lt;scope&gt;</span>test<span class="nt">&lt;/scope&gt;</span>
<a id="__codelineno-0-53" name="__codelineno-0-53"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-54" name="__codelineno-0-54"></a><span class="w">    </span><span class="cm">&lt;!-- POI操作Excel --&gt;</span>
<a id="__codelineno-0-55" name="__codelineno-0-55"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-56" name="__codelineno-0-56"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.apache.poi<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-57" name="__codelineno-0-57"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>poi<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-58" name="__codelineno-0-58"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>5.2.3<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-59" name="__codelineno-0-59"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-60" name="__codelineno-0-60"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-61" name="__codelineno-0-61"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.apache.poi<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-62" name="__codelineno-0-62"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>poi-ooxml<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-63" name="__codelineno-0-63"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>5.2.3<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-64" name="__codelineno-0-64"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-65" name="__codelineno-0-65"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-66" name="__codelineno-0-66"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.apache.poi<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-67" name="__codelineno-0-67"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>poi-ooxml-schemas<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-68" name="__codelineno-0-68"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>4.1.2<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-69" name="__codelineno-0-69"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-70" name="__codelineno-0-70"></a><span class="w">    </span><span class="cm">&lt;!-- SQLite JDBC is a library for accessing and creating SQLite database files in Java (it</span>
<a id="__codelineno-0-71" name="__codelineno-0-71"></a><span class="cm">    includes native libraries) --&gt;</span>
<a id="__codelineno-0-72" name="__codelineno-0-72"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-73" name="__codelineno-0-73"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.xerial<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-74" name="__codelineno-0-74"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>sqlite-jdbc<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-75" name="__codelineno-0-75"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>3.41.2.1<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-76" name="__codelineno-0-76"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-77" name="__codelineno-0-77"></a><span class="w">    </span><span class="cm">&lt;!-- 单元测试 --&gt;</span>
<a id="__codelineno-0-78" name="__codelineno-0-78"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-79" name="__codelineno-0-79"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>junit<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-80" name="__codelineno-0-80"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>junit<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-81" name="__codelineno-0-81"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>4.13.2<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-82" name="__codelineno-0-82"></a><span class="w">      </span><span class="nt">&lt;scope&gt;</span>test<span class="nt">&lt;/scope&gt;</span>
<a id="__codelineno-0-83" name="__codelineno-0-83"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-84" name="__codelineno-0-84"></a><span class="w">    </span><span class="cm">&lt;!-- MyBatis 分页插件 PageHelper --&gt;</span>
<a id="__codelineno-0-85" name="__codelineno-0-85"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-86" name="__codelineno-0-86"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>com.github.pagehelper<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-87" name="__codelineno-0-87"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>pagehelper-spring-boot-starter<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-88" name="__codelineno-0-88"></a><span class="w">      </span><span class="nt">&lt;version&gt;</span>1.2.4<span class="nt">&lt;/version&gt;</span>
<a id="__codelineno-0-89" name="__codelineno-0-89"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-90" name="__codelineno-0-90"></a><span class="w">    </span><span class="cm">&lt;!-- JDBC Type 4 driver for MySQL. --&gt;</span>
<a id="__codelineno-0-91" name="__codelineno-0-91"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-92" name="__codelineno-0-92"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>com.mysql<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-93" name="__codelineno-0-93"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>mysql-connector-j<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-94" name="__codelineno-0-94"></a><span class="w">      </span><span class="nt">&lt;scope&gt;</span>runtime<span class="nt">&lt;/scope&gt;</span>
<a id="__codelineno-0-95" name="__codelineno-0-95"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-96" name="__codelineno-0-96"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-97" name="__codelineno-0-97"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-98" name="__codelineno-0-98"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-devtools<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-99" name="__codelineno-0-99"></a><span class="w">      </span><span class="nt">&lt;scope&gt;</span>runtime<span class="nt">&lt;/scope&gt;</span>
<a id="__codelineno-0-100" name="__codelineno-0-100"></a><span class="w">      </span><span class="nt">&lt;optional&gt;</span>true<span class="nt">&lt;/optional&gt;</span>
<a id="__codelineno-0-101" name="__codelineno-0-101"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-102" name="__codelineno-0-102"></a><span class="w">    </span><span class="nt">&lt;dependency&gt;</span>
<a id="__codelineno-0-103" name="__codelineno-0-103"></a><span class="w">      </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-104" name="__codelineno-0-104"></a><span class="w">      </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-starter-test<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-105" name="__codelineno-0-105"></a><span class="w">      </span><span class="nt">&lt;scope&gt;</span>test<span class="nt">&lt;/scope&gt;</span>
<a id="__codelineno-0-106" name="__codelineno-0-106"></a><span class="w">    </span><span class="nt">&lt;/dependency&gt;</span>
<a id="__codelineno-0-107" name="__codelineno-0-107"></a><span class="w">  </span><span class="nt">&lt;/dependencies&gt;</span>
<a id="__codelineno-0-108" name="__codelineno-0-108"></a><span class="w">  </span><span class="cm">&lt;!-- 修改maven远程仓库为国内服务器 --&gt;</span>
<a id="__codelineno-0-109" name="__codelineno-0-109"></a><span class="w">  </span><span class="nt">&lt;repositories&gt;</span>
<a id="__codelineno-0-110" name="__codelineno-0-110"></a><span class="w">    </span><span class="nt">&lt;repository&gt;</span>
<a id="__codelineno-0-111" name="__codelineno-0-111"></a><span class="w">      </span><span class="nt">&lt;id&gt;</span>public<span class="nt">&lt;/id&gt;</span>
<a id="__codelineno-0-112" name="__codelineno-0-112"></a><span class="w">      </span><span class="nt">&lt;name&gt;</span>common<span class="w"> </span>central<span class="nt">&lt;/name&gt;</span>
<a id="__codelineno-0-113" name="__codelineno-0-113"></a><span class="w">      </span><span class="nt">&lt;url&gt;</span>http://maven.aliyun.com/nexus/content/groups/public<span class="nt">&lt;/url&gt;</span>
<a id="__codelineno-0-114" name="__codelineno-0-114"></a><span class="w">      </span><span class="nt">&lt;releases&gt;</span>
<a id="__codelineno-0-115" name="__codelineno-0-115"></a><span class="w">        </span><span class="nt">&lt;enabled&gt;</span>true<span class="nt">&lt;/enabled&gt;</span>
<a id="__codelineno-0-116" name="__codelineno-0-116"></a><span class="w">      </span><span class="nt">&lt;/releases&gt;</span>
<a id="__codelineno-0-117" name="__codelineno-0-117"></a><span class="w">      </span><span class="nt">&lt;snapshots&gt;</span>
<a id="__codelineno-0-118" name="__codelineno-0-118"></a><span class="w">        </span><span class="nt">&lt;enabled&gt;</span>true<span class="nt">&lt;/enabled&gt;</span>
<a id="__codelineno-0-119" name="__codelineno-0-119"></a><span class="w">      </span><span class="nt">&lt;/snapshots&gt;</span>
<a id="__codelineno-0-120" name="__codelineno-0-120"></a><span class="w">    </span><span class="nt">&lt;/repository&gt;</span>
<a id="__codelineno-0-121" name="__codelineno-0-121"></a><span class="w">  </span><span class="nt">&lt;/repositories&gt;</span>
<a id="__codelineno-0-122" name="__codelineno-0-122"></a><span class="w">  </span><span class="nt">&lt;pluginRepositories&gt;</span>
<a id="__codelineno-0-123" name="__codelineno-0-123"></a><span class="w">    </span><span class="nt">&lt;pluginRepository&gt;</span>
<a id="__codelineno-0-124" name="__codelineno-0-124"></a><span class="w">      </span><span class="nt">&lt;id&gt;</span>public<span class="nt">&lt;/id&gt;</span>
<a id="__codelineno-0-125" name="__codelineno-0-125"></a><span class="w">      </span><span class="nt">&lt;name&gt;</span>common<span class="w"> </span>central<span class="nt">&lt;/name&gt;</span>
<a id="__codelineno-0-126" name="__codelineno-0-126"></a><span class="w">      </span><span class="nt">&lt;url&gt;</span>http://maven.aliyun.com/nexus/content/groups/public<span class="nt">&lt;/url&gt;</span>
<a id="__codelineno-0-127" name="__codelineno-0-127"></a><span class="w">      </span><span class="nt">&lt;releases&gt;</span>
<a id="__codelineno-0-128" name="__codelineno-0-128"></a><span class="w">        </span><span class="nt">&lt;enabled&gt;</span>true<span class="nt">&lt;/enabled&gt;</span>
<a id="__codelineno-0-129" name="__codelineno-0-129"></a><span class="w">      </span><span class="nt">&lt;/releases&gt;</span>
<a id="__codelineno-0-130" name="__codelineno-0-130"></a><span class="w">      </span><span class="nt">&lt;snapshots&gt;</span>
<a id="__codelineno-0-131" name="__codelineno-0-131"></a><span class="w">        </span><span class="nt">&lt;enabled&gt;</span>true<span class="nt">&lt;/enabled&gt;</span>
<a id="__codelineno-0-132" name="__codelineno-0-132"></a><span class="w">      </span><span class="nt">&lt;/snapshots&gt;</span>
<a id="__codelineno-0-133" name="__codelineno-0-133"></a><span class="w">    </span><span class="nt">&lt;/pluginRepository&gt;</span>
<a id="__codelineno-0-134" name="__codelineno-0-134"></a><span class="w">  </span><span class="nt">&lt;/pluginRepositories&gt;</span>
<a id="__codelineno-0-135" name="__codelineno-0-135"></a><span class="w">  </span><span class="nt">&lt;build&gt;</span>
<a id="__codelineno-0-136" name="__codelineno-0-136"></a><span class="w">    </span><span class="nt">&lt;plugins&gt;</span>
<a id="__codelineno-0-137" name="__codelineno-0-137"></a><span class="w">      </span><span class="nt">&lt;plugin&gt;</span>
<a id="__codelineno-0-138" name="__codelineno-0-138"></a><span class="w">        </span><span class="nt">&lt;groupId&gt;</span>org.springframework.boot<span class="nt">&lt;/groupId&gt;</span>
<a id="__codelineno-0-139" name="__codelineno-0-139"></a><span class="w">        </span><span class="nt">&lt;artifactId&gt;</span>spring-boot-maven-plugin<span class="nt">&lt;/artifactId&gt;</span>
<a id="__codelineno-0-140" name="__codelineno-0-140"></a><span class="w">      </span><span class="nt">&lt;/plugin&gt;</span>
<a id="__codelineno-0-141" name="__codelineno-0-141"></a><span class="w">    </span><span class="nt">&lt;/plugins&gt;</span>
<a id="__codelineno-0-142" name="__codelineno-0-142"></a><span class="w">  </span><span class="nt">&lt;/build&gt;</span>
<a id="__codelineno-0-143" name="__codelineno-0-143"></a><span class="nt">&lt;/project&gt;</span>
</code></pre></div></td></tr></table></div>
</details>
<h3 id="_1">配置</h3>
<ol>
<li>
<p>打开<code>application.properties</code>文件，配置Sqlite数据库连接信息，如下所示：</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/resources/application.properties</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-1-1">1</a></span>
<span class="normal"><a href="#__codelineno-1-2">2</a></span>
<span class="normal"><a href="#__codelineno-1-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1"></a><span class="c1"># sqlite</span>
<a id="__codelineno-1-2" name="__codelineno-1-2"></a><span class="na">spring.datasource.url</span><span class="o">=</span><span class="s">jdbc:sqlite:c:/app/sqlite/data</span>
<a id="__codelineno-1-3" name="__codelineno-1-3"></a><span class="na">spring.datasource.driver-class-name</span><span class="o">=</span><span class="s">org.sqlite.JDBC</span>
</code></pre></div></td></tr></table></div>
</li>
<li>
<p>设定Mybatis配置参数，如下所示：</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/resources/application.properties</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-2-1">1</a></span>
<span class="normal"><a href="#__codelineno-2-2">2</a></span>
<span class="normal"><a href="#__codelineno-2-3">3</a></span>
<span class="normal"><a href="#__codelineno-2-4">4</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1"></a><span class="c1">#mybatis</span>
<a id="__codelineno-2-2" name="__codelineno-2-2"></a><span class="na">mybatis.type-aliases-package</span><span class="o">=</span><span class="s">xust.stu.**.domain</span>
<a id="__codelineno-2-3" name="__codelineno-2-3"></a><span class="na">mybatis.mapper-locations</span><span class="o">=</span><span class="s">classpath:mapper/*.xml</span>
<a id="__codelineno-2-4" name="__codelineno-2-4"></a><span class="na">mybatis.typeAliasesPackage</span><span class="o">=</span><span class="s">xust.stu.**.domain</span>
</code></pre></div></td></tr></table></div>
</li>
</ol>
<details class="tip">
<summary>application.properties</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/resources/application.properties</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-3-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-3-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-3-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-3-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-3-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-3-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-3-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-3-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-3-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-3-10">10</a></span>
<span class="normal"><a href="#__codelineno-3-11">11</a></span>
<span class="normal"><a href="#__codelineno-3-12">12</a></span>
<span class="normal"><a href="#__codelineno-3-13">13</a></span>
<span class="normal"><a href="#__codelineno-3-14">14</a></span>
<span class="normal"><a href="#__codelineno-3-15">15</a></span>
<span class="normal"><a href="#__codelineno-3-16">16</a></span>
<span class="normal"><a href="#__codelineno-3-17">17</a></span>
<span class="normal"><a href="#__codelineno-3-18">18</a></span>
<span class="normal"><a href="#__codelineno-3-19">19</a></span>
<span class="normal"><a href="#__codelineno-3-20">20</a></span>
<span class="normal"><a href="#__codelineno-3-21">21</a></span>
<span class="normal"><a href="#__codelineno-3-22">22</a></span>
<span class="normal"><a href="#__codelineno-3-23">23</a></span>
<span class="normal"><a href="#__codelineno-3-24">24</a></span>
<span class="normal"><a href="#__codelineno-3-25">25</a></span>
<span class="normal"><a href="#__codelineno-3-26">26</a></span>
<span class="normal"><a href="#__codelineno-3-27">27</a></span>
<span class="normal"><a href="#__codelineno-3-28">28</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1"></a><span class="na">server.port</span><span class="o">=</span><span class="s">8080</span>
<a id="__codelineno-3-2" name="__codelineno-3-2"></a><span class="na">server.address</span><span class="o">=</span><span class="s">0.0.0.0</span>
<a id="__codelineno-3-3" name="__codelineno-3-3"></a><span class="na">server.servlet.context-path</span><span class="o">=</span><span class="s">/</span>
<a id="__codelineno-3-4" name="__codelineno-3-4"></a><span class="na">spring.profiles.active</span><span class="o">=</span><span class="s">dev</span>
<a id="__codelineno-3-5" name="__codelineno-3-5"></a>
<a id="__codelineno-3-6" name="__codelineno-3-6"></a><span class="c1">## Time zone setting</span>
<a id="__codelineno-3-7" name="__codelineno-3-7"></a><span class="na">spring.jackson.time-zone</span><span class="o">=</span><span class="s">GMT+8</span>
<a id="__codelineno-3-8" name="__codelineno-3-8"></a>
<a id="__codelineno-3-9" name="__codelineno-3-9"></a><span class="c1"># --8&lt;-- [start:mybatis]</span>
<a id="__codelineno-3-10" name="__codelineno-3-10"></a><span class="c1">#mybatis</span>
<a id="__codelineno-3-11" name="__codelineno-3-11"></a><span class="na">mybatis.type-aliases-package</span><span class="o">=</span><span class="s">xust.stu.**.domain</span>
<a id="__codelineno-3-12" name="__codelineno-3-12"></a><span class="na">mybatis.mapper-locations</span><span class="o">=</span><span class="s">classpath:mapper/*.xml</span>
<a id="__codelineno-3-13" name="__codelineno-3-13"></a><span class="na">mybatis.typeAliasesPackage</span><span class="o">=</span><span class="s">xust.stu.**.domain</span>
<a id="__codelineno-3-14" name="__codelineno-3-14"></a><span class="c1"># --8&lt;-- [end:mybatis]</span>
<a id="__codelineno-3-15" name="__codelineno-3-15"></a>
<a id="__codelineno-3-16" name="__codelineno-3-16"></a><span class="c1">#freemarker</span>
<a id="__codelineno-3-17" name="__codelineno-3-17"></a><span class="na">spring.freemarker.charset</span><span class="o">=</span><span class="s">UTF-8</span>
<a id="__codelineno-3-18" name="__codelineno-3-18"></a><span class="na">spring.freemarker.suffix</span><span class="o">=</span><span class="s">.f</span>
<a id="__codelineno-3-19" name="__codelineno-3-19"></a>
<a id="__codelineno-3-20" name="__codelineno-3-20"></a><span class="c1">#Gzip</span>
<a id="__codelineno-3-21" name="__codelineno-3-21"></a><span class="na">server.compression.enabled</span><span class="o">=</span><span class="s">true</span><span class="w">  </span>
<a id="__codelineno-3-22" name="__codelineno-3-22"></a><span class="na">server.compression.mime-types</span><span class="o">=</span><span class="s">text/javascript,application/javascript,text/css</span>
<a id="__codelineno-3-23" name="__codelineno-3-23"></a>
<a id="__codelineno-3-24" name="__codelineno-3-24"></a><span class="c1"># --8&lt;-- [start:sqlite]</span>
<a id="__codelineno-3-25" name="__codelineno-3-25"></a><span class="c1"># sqlite</span>
<a id="__codelineno-3-26" name="__codelineno-3-26"></a><span class="na">spring.datasource.url</span><span class="o">=</span><span class="s">jdbc:sqlite:c:/app/sqlite/data</span>
<a id="__codelineno-3-27" name="__codelineno-3-27"></a><span class="na">spring.datasource.driver-class-name</span><span class="o">=</span><span class="s">org.sqlite.JDBC</span>
<a id="__codelineno-3-28" name="__codelineno-3-28"></a><span class="c1"># --8&lt;-- [end:sqlite]</span>
</code></pre></div></td></tr></table></div>
</details>
<h3 id="_2">创建学生表</h3>
<ol>
<li>
<p>编写学生表定义及测试数据<code>SQL</code>代码，存放在<code>src/main/resources/sql</code></p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/resources/sql/stu_schema.sql</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-4-1">1</a></span>
<span class="normal"><a href="#__codelineno-4-2">2</a></span>
<span class="normal"><a href="#__codelineno-4-3">3</a></span>
<span class="normal"><a href="#__codelineno-4-4">4</a></span>
<span class="normal"><a href="#__codelineno-4-5">5</a></span>
<span class="normal"><a href="#__codelineno-4-6">6</a></span>
<span class="normal"><a href="#__codelineno-4-7">7</a></span>
<span class="normal"><a href="#__codelineno-4-8">8</a></span>
<span class="normal"><a href="#__codelineno-4-9">9</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1"></a><span class="k">drop</span><span class="w"> </span><span class="k">table</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="k">exists</span><span class="w"> </span><span class="n">STUDENT</span><span class="p">;</span>
<a id="__codelineno-4-2" name="__codelineno-4-2"></a><span class="k">create</span><span class="w"> </span><span class="k">table</span><span class="w"> </span><span class="n">STUDENT</span><span class="p">(</span>
<a id="__codelineno-4-3" name="__codelineno-4-3"></a><span class="w">    </span><span class="n">Id</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">200</span><span class="p">)</span><span class="w"> </span><span class="k">primary</span><span class="w"> </span><span class="k">key</span><span class="p">,</span>
<a id="__codelineno-4-4" name="__codelineno-4-4"></a><span class="w">    </span><span class="k">no</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span><span class="w"> </span><span class="k">unique</span><span class="w">  </span><span class="k">not</span><span class="w"> </span><span class="k">null</span><span class="p">,</span>
<a id="__codelineno-4-5" name="__codelineno-4-5"></a><span class="w">    </span><span class="n">name</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span><span class="w"> </span><span class="k">not</span><span class="w"> </span><span class="k">null</span><span class="p">,</span>
<a id="__codelineno-4-6" name="__codelineno-4-6"></a><span class="w">    </span><span class="n">gender</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">2</span><span class="p">),</span>
<a id="__codelineno-4-7" name="__codelineno-4-7"></a><span class="w">    </span><span class="n">age</span><span class="w"> </span><span class="nb">int</span><span class="p">,</span>
<a id="__codelineno-4-8" name="__codelineno-4-8"></a><span class="w">    </span><span class="n">dept</span><span class="w"> </span><span class="nb">varchar</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span>
<a id="__codelineno-4-9" name="__codelineno-4-9"></a><span class="p">);</span>
</code></pre></div></td></tr></table></div>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/resources/sql/stu_data.sql</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-5-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-5-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-5-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-5-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-5-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-5-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-5-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-5-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-5-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-5-10">10</a></span>
<span class="normal"><a href="#__codelineno-5-11">11</a></span>
<span class="normal"><a href="#__codelineno-5-12">12</a></span>
<span class="normal"><a href="#__codelineno-5-13">13</a></span>
<span class="normal"><a href="#__codelineno-5-14">14</a></span>
<span class="normal"><a href="#__codelineno-5-15">15</a></span>
<span class="normal"><a href="#__codelineno-5-16">16</a></span>
<span class="normal"><a href="#__codelineno-5-17">17</a></span>
<span class="normal"><a href="#__codelineno-5-18">18</a></span>
<span class="normal"><a href="#__codelineno-5-19">19</a></span>
<span class="normal"><a href="#__codelineno-5-20">20</a></span>
<span class="normal"><a href="#__codelineno-5-21">21</a></span>
<span class="normal"><a href="#__codelineno-5-22">22</a></span>
<span class="normal"><a href="#__codelineno-5-23">23</a></span>
<span class="normal"><a href="#__codelineno-5-24">24</a></span>
<span class="normal"><a href="#__codelineno-5-25">25</a></span>
<span class="normal"><a href="#__codelineno-5-26">26</a></span>
<span class="normal"><a href="#__codelineno-5-27">27</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1"></a><span class="k">delete</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">STUDENT</span><span class="p">;</span>
<a id="__codelineno-5-2" name="__codelineno-5-2"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-3" name="__codelineno-5-3"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X0&#39;</span><span class="p">,</span><span class="s1">&#39;X0&#39;</span><span class="p">,</span><span class="s1">&#39;X0&#39;</span><span class="p">,</span><span class="s1">&#39;X0&#39;</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="s1">&#39;X0&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-4" name="__codelineno-5-4"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-5" name="__codelineno-5-5"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X1&#39;</span><span class="p">,</span><span class="s1">&#39;X1&#39;</span><span class="p">,</span><span class="s1">&#39;X1&#39;</span><span class="p">,</span><span class="s1">&#39;X1&#39;</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="s1">&#39;X1&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-6" name="__codelineno-5-6"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-7" name="__codelineno-5-7"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X2&#39;</span><span class="p">,</span><span class="s1">&#39;X2&#39;</span><span class="p">,</span><span class="s1">&#39;X2&#39;</span><span class="p">,</span><span class="s1">&#39;X2&#39;</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="s1">&#39;X2&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-8" name="__codelineno-5-8"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-9" name="__codelineno-5-9"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X3&#39;</span><span class="p">,</span><span class="s1">&#39;X3&#39;</span><span class="p">,</span><span class="s1">&#39;X3&#39;</span><span class="p">,</span><span class="s1">&#39;X3&#39;</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="s1">&#39;X3&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-10" name="__codelineno-5-10"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-11" name="__codelineno-5-11"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X4&#39;</span><span class="p">,</span><span class="s1">&#39;X4&#39;</span><span class="p">,</span><span class="s1">&#39;X4&#39;</span><span class="p">,</span><span class="s1">&#39;X4&#39;</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="s1">&#39;X4&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-12" name="__codelineno-5-12"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-13" name="__codelineno-5-13"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X5&#39;</span><span class="p">,</span><span class="s1">&#39;X5&#39;</span><span class="p">,</span><span class="s1">&#39;X5&#39;</span><span class="p">,</span><span class="s1">&#39;X5&#39;</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="s1">&#39;X5&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-14" name="__codelineno-5-14"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-15" name="__codelineno-5-15"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X6&#39;</span><span class="p">,</span><span class="s1">&#39;X6&#39;</span><span class="p">,</span><span class="s1">&#39;X6&#39;</span><span class="p">,</span><span class="s1">&#39;X6&#39;</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="s1">&#39;X6&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-16" name="__codelineno-5-16"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-17" name="__codelineno-5-17"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X7&#39;</span><span class="p">,</span><span class="s1">&#39;X7&#39;</span><span class="p">,</span><span class="s1">&#39;X7&#39;</span><span class="p">,</span><span class="s1">&#39;X7&#39;</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="s1">&#39;X7&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-18" name="__codelineno-5-18"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-19" name="__codelineno-5-19"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X8&#39;</span><span class="p">,</span><span class="s1">&#39;X8&#39;</span><span class="p">,</span><span class="s1">&#39;X8&#39;</span><span class="p">,</span><span class="s1">&#39;X8&#39;</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="s1">&#39;X8&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-20" name="__codelineno-5-20"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-21" name="__codelineno-5-21"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X9&#39;</span><span class="p">,</span><span class="s1">&#39;X9&#39;</span><span class="p">,</span><span class="s1">&#39;X9&#39;</span><span class="p">,</span><span class="s1">&#39;X9&#39;</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="s1">&#39;X9&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-22" name="__codelineno-5-22"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-23" name="__codelineno-5-23"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X10&#39;</span><span class="p">,</span><span class="s1">&#39;X10&#39;</span><span class="p">,</span><span class="s1">&#39;X10&#39;</span><span class="p">,</span><span class="s1">&#39;X10&#39;</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="s1">&#39;X10&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-24" name="__codelineno-5-24"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-25" name="__codelineno-5-25"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X11&#39;</span><span class="p">,</span><span class="s1">&#39;X11&#39;</span><span class="p">,</span><span class="s1">&#39;X11&#39;</span><span class="p">,</span><span class="s1">&#39;X11&#39;</span><span class="p">,</span><span class="mi">11</span><span class="p">,</span><span class="s1">&#39;X11&#39;</span><span class="p">);</span><span class="w"> </span>
<a id="__codelineno-5-26" name="__codelineno-5-26"></a><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-5-27" name="__codelineno-5-27"></a><span class="k">values</span><span class="w"> </span><span class="p">(</span><span class="s1">&#39;X12&#39;</span><span class="p">,</span><span class="s1">&#39;X12&#39;</span><span class="p">,</span><span class="s1">&#39;X12&#39;</span><span class="p">,</span><span class="s1">&#39;X12&#39;</span><span class="p">,</span><span class="mi">12</span><span class="p">,</span><span class="s1">&#39;X12&#39;</span><span class="p">);</span><span class="w"> </span>
</code></pre></div></td></tr></table></div>
<blockquote>
<p>前步配置中已设置自动执行这两个脚本</p>
</blockquote>
</li>
<li>
<p>在项目中创建<code>Student</code>实体类，包名为<code>xust.stu.demo.domain</code></p>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-6-1">1</a></span>
<span class="normal"><a href="#__codelineno-6-2">2</a></span>
<span class="normal"><a href="#__codelineno-6-3">3</a></span>
<span class="normal"><a href="#__codelineno-6-4">4</a></span>
<span class="normal"><a href="#__codelineno-6-5">5</a></span>
<span class="normal"><a href="#__codelineno-6-6">6</a></span>
<span class="normal"><a href="#__codelineno-6-7">7</a></span>
<span class="normal"><a href="#__codelineno-6-8">8</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1"></a><span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">Student</span><span class="p">{</span>
<a id="__codelineno-6-2" name="__codelineno-6-2"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">id</span><span class="p">;</span>
<a id="__codelineno-6-3" name="__codelineno-6-3"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">no</span><span class="p">;</span>
<a id="__codelineno-6-4" name="__codelineno-6-4"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">name</span><span class="p">;</span>
<a id="__codelineno-6-5" name="__codelineno-6-5"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">gender</span><span class="p">;</span>
<a id="__codelineno-6-6" name="__codelineno-6-6"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">Integer</span><span class="w"> </span><span class="n">age</span><span class="p">;</span>
<a id="__codelineno-6-7" name="__codelineno-6-7"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">dept</span><span class="p">;</span>
<a id="__codelineno-6-8" name="__codelineno-6-8"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>Student.java</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/java/xust/stu/demo/domain/Student.java</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-7-1">  1</a></span>
<span class="normal"><a href="#__codelineno-7-2">  2</a></span>
<span class="normal"><a href="#__codelineno-7-3">  3</a></span>
<span class="normal"><a href="#__codelineno-7-4">  4</a></span>
<span class="normal"><a href="#__codelineno-7-5">  5</a></span>
<span class="normal"><a href="#__codelineno-7-6">  6</a></span>
<span class="normal"><a href="#__codelineno-7-7">  7</a></span>
<span class="normal"><a href="#__codelineno-7-8">  8</a></span>
<span class="normal"><a href="#__codelineno-7-9">  9</a></span>
<span class="normal"><a href="#__codelineno-7-10"> 10</a></span>
<span class="normal"><a href="#__codelineno-7-11"> 11</a></span>
<span class="normal"><a href="#__codelineno-7-12"> 12</a></span>
<span class="normal"><a href="#__codelineno-7-13"> 13</a></span>
<span class="normal"><a href="#__codelineno-7-14"> 14</a></span>
<span class="normal"><a href="#__codelineno-7-15"> 15</a></span>
<span class="normal"><a href="#__codelineno-7-16"> 16</a></span>
<span class="normal"><a href="#__codelineno-7-17"> 17</a></span>
<span class="normal"><a href="#__codelineno-7-18"> 18</a></span>
<span class="normal"><a href="#__codelineno-7-19"> 19</a></span>
<span class="normal"><a href="#__codelineno-7-20"> 20</a></span>
<span class="normal"><a href="#__codelineno-7-21"> 21</a></span>
<span class="normal"><a href="#__codelineno-7-22"> 22</a></span>
<span class="normal"><a href="#__codelineno-7-23"> 23</a></span>
<span class="normal"><a href="#__codelineno-7-24"> 24</a></span>
<span class="normal"><a href="#__codelineno-7-25"> 25</a></span>
<span class="normal"><a href="#__codelineno-7-26"> 26</a></span>
<span class="normal"><a href="#__codelineno-7-27"> 27</a></span>
<span class="normal"><a href="#__codelineno-7-28"> 28</a></span>
<span class="normal"><a href="#__codelineno-7-29"> 29</a></span>
<span class="normal"><a href="#__codelineno-7-30"> 30</a></span>
<span class="normal"><a href="#__codelineno-7-31"> 31</a></span>
<span class="normal"><a href="#__codelineno-7-32"> 32</a></span>
<span class="normal"><a href="#__codelineno-7-33"> 33</a></span>
<span class="normal"><a href="#__codelineno-7-34"> 34</a></span>
<span class="normal"><a href="#__codelineno-7-35"> 35</a></span>
<span class="normal"><a href="#__codelineno-7-36"> 36</a></span>
<span class="normal"><a href="#__codelineno-7-37"> 37</a></span>
<span class="normal"><a href="#__codelineno-7-38"> 38</a></span>
<span class="normal"><a href="#__codelineno-7-39"> 39</a></span>
<span class="normal"><a href="#__codelineno-7-40"> 40</a></span>
<span class="normal"><a href="#__codelineno-7-41"> 41</a></span>
<span class="normal"><a href="#__codelineno-7-42"> 42</a></span>
<span class="normal"><a href="#__codelineno-7-43"> 43</a></span>
<span class="normal"><a href="#__codelineno-7-44"> 44</a></span>
<span class="normal"><a href="#__codelineno-7-45"> 45</a></span>
<span class="normal"><a href="#__codelineno-7-46"> 46</a></span>
<span class="normal"><a href="#__codelineno-7-47"> 47</a></span>
<span class="normal"><a href="#__codelineno-7-48"> 48</a></span>
<span class="normal"><a href="#__codelineno-7-49"> 49</a></span>
<span class="normal"><a href="#__codelineno-7-50"> 50</a></span>
<span class="normal"><a href="#__codelineno-7-51"> 51</a></span>
<span class="normal"><a href="#__codelineno-7-52"> 52</a></span>
<span class="normal"><a href="#__codelineno-7-53"> 53</a></span>
<span class="normal"><a href="#__codelineno-7-54"> 54</a></span>
<span class="normal"><a href="#__codelineno-7-55"> 55</a></span>
<span class="normal"><a href="#__codelineno-7-56"> 56</a></span>
<span class="normal"><a href="#__codelineno-7-57"> 57</a></span>
<span class="normal"><a href="#__codelineno-7-58"> 58</a></span>
<span class="normal"><a href="#__codelineno-7-59"> 59</a></span>
<span class="normal"><a href="#__codelineno-7-60"> 60</a></span>
<span class="normal"><a href="#__codelineno-7-61"> 61</a></span>
<span class="normal"><a href="#__codelineno-7-62"> 62</a></span>
<span class="normal"><a href="#__codelineno-7-63"> 63</a></span>
<span class="normal"><a href="#__codelineno-7-64"> 64</a></span>
<span class="normal"><a href="#__codelineno-7-65"> 65</a></span>
<span class="normal"><a href="#__codelineno-7-66"> 66</a></span>
<span class="normal"><a href="#__codelineno-7-67"> 67</a></span>
<span class="normal"><a href="#__codelineno-7-68"> 68</a></span>
<span class="normal"><a href="#__codelineno-7-69"> 69</a></span>
<span class="normal"><a href="#__codelineno-7-70"> 70</a></span>
<span class="normal"><a href="#__codelineno-7-71"> 71</a></span>
<span class="normal"><a href="#__codelineno-7-72"> 72</a></span>
<span class="normal"><a href="#__codelineno-7-73"> 73</a></span>
<span class="normal"><a href="#__codelineno-7-74"> 74</a></span>
<span class="normal"><a href="#__codelineno-7-75"> 75</a></span>
<span class="normal"><a href="#__codelineno-7-76"> 76</a></span>
<span class="normal"><a href="#__codelineno-7-77"> 77</a></span>
<span class="normal"><a href="#__codelineno-7-78"> 78</a></span>
<span class="normal"><a href="#__codelineno-7-79"> 79</a></span>
<span class="normal"><a href="#__codelineno-7-80"> 80</a></span>
<span class="normal"><a href="#__codelineno-7-81"> 81</a></span>
<span class="normal"><a href="#__codelineno-7-82"> 82</a></span>
<span class="normal"><a href="#__codelineno-7-83"> 83</a></span>
<span class="normal"><a href="#__codelineno-7-84"> 84</a></span>
<span class="normal"><a href="#__codelineno-7-85"> 85</a></span>
<span class="normal"><a href="#__codelineno-7-86"> 86</a></span>
<span class="normal"><a href="#__codelineno-7-87"> 87</a></span>
<span class="normal"><a href="#__codelineno-7-88"> 88</a></span>
<span class="normal"><a href="#__codelineno-7-89"> 89</a></span>
<span class="normal"><a href="#__codelineno-7-90"> 90</a></span>
<span class="normal"><a href="#__codelineno-7-91"> 91</a></span>
<span class="normal"><a href="#__codelineno-7-92"> 92</a></span>
<span class="normal"><a href="#__codelineno-7-93"> 93</a></span>
<span class="normal"><a href="#__codelineno-7-94"> 94</a></span>
<span class="normal"><a href="#__codelineno-7-95"> 95</a></span>
<span class="normal"><a href="#__codelineno-7-96"> 96</a></span>
<span class="normal"><a href="#__codelineno-7-97"> 97</a></span>
<span class="normal"><a href="#__codelineno-7-98"> 98</a></span>
<span class="normal"><a href="#__codelineno-7-99"> 99</a></span>
<span class="normal"><a href="#__codelineno-7-100">100</a></span>
<span class="normal"><a href="#__codelineno-7-101">101</a></span>
<span class="normal"><a href="#__codelineno-7-102">102</a></span>
<span class="normal"><a href="#__codelineno-7-103">103</a></span>
<span class="normal"><a href="#__codelineno-7-104">104</a></span>
<span class="normal"><a href="#__codelineno-7-105">105</a></span>
<span class="normal"><a href="#__codelineno-7-106">106</a></span>
<span class="normal"><a href="#__codelineno-7-107">107</a></span>
<span class="normal"><a href="#__codelineno-7-108">108</a></span>
<span class="normal"><a href="#__codelineno-7-109">109</a></span>
<span class="normal"><a href="#__codelineno-7-110">110</a></span>
<span class="normal"><a href="#__codelineno-7-111">111</a></span>
<span class="normal"><a href="#__codelineno-7-112">112</a></span>
<span class="normal"><a href="#__codelineno-7-113">113</a></span>
<span class="normal"><a href="#__codelineno-7-114">114</a></span>
<span class="normal"><a href="#__codelineno-7-115">115</a></span>
<span class="normal"><a href="#__codelineno-7-116">116</a></span>
<span class="normal"><a href="#__codelineno-7-117">117</a></span>
<span class="normal"><a href="#__codelineno-7-118">118</a></span>
<span class="normal"><a href="#__codelineno-7-119">119</a></span>
<span class="normal"><a href="#__codelineno-7-120">120</a></span>
<span class="normal"><a href="#__codelineno-7-121">121</a></span>
<span class="normal"><a href="#__codelineno-7-122">122</a></span>
<span class="normal"><a href="#__codelineno-7-123">123</a></span>
<span class="normal"><a href="#__codelineno-7-124">124</a></span>
<span class="normal"><a href="#__codelineno-7-125">125</a></span>
<span class="normal"><a href="#__codelineno-7-126">126</a></span>
<span class="normal"><a href="#__codelineno-7-127">127</a></span>
<span class="normal"><a href="#__codelineno-7-128">128</a></span>
<span class="normal"><a href="#__codelineno-7-129">129</a></span>
<span class="normal"><a href="#__codelineno-7-130">130</a></span>
<span class="normal"><a href="#__codelineno-7-131">131</a></span>
<span class="normal"><a href="#__codelineno-7-132">132</a></span>
<span class="normal"><a href="#__codelineno-7-133">133</a></span>
<span class="normal"><a href="#__codelineno-7-134">134</a></span>
<span class="normal"><a href="#__codelineno-7-135">135</a></span>
<span class="normal"><a href="#__codelineno-7-136">136</a></span>
<span class="normal"><a href="#__codelineno-7-137">137</a></span>
<span class="normal"><a href="#__codelineno-7-138">138</a></span>
<span class="normal"><a href="#__codelineno-7-139">139</a></span>
<span class="normal"><a href="#__codelineno-7-140">140</a></span>
<span class="normal"><a href="#__codelineno-7-141">141</a></span>
<span class="normal"><a href="#__codelineno-7-142">142</a></span>
<span class="normal"><a href="#__codelineno-7-143">143</a></span>
<span class="normal"><a href="#__codelineno-7-144">144</a></span>
<span class="normal"><a href="#__codelineno-7-145">145</a></span>
<span class="normal"><a href="#__codelineno-7-146">146</a></span>
<span class="normal"><a href="#__codelineno-7-147">147</a></span>
<span class="normal"><a href="#__codelineno-7-148">148</a></span>
<span class="normal"><a href="#__codelineno-7-149">149</a></span>
<span class="normal"><a href="#__codelineno-7-150">150</a></span>
<span class="normal"><a href="#__codelineno-7-151">151</a></span>
<span class="normal"><a href="#__codelineno-7-152">152</a></span>
<span class="normal"><a href="#__codelineno-7-153">153</a></span>
<span class="normal"><a href="#__codelineno-7-154">154</a></span>
<span class="normal"><a href="#__codelineno-7-155">155</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1"></a><span class="cm">/*</span>
<a id="__codelineno-7-2" name="__codelineno-7-2"></a><span class="cm"> * File name : Student.java 2023-04-20</span>
<a id="__codelineno-7-3" name="__codelineno-7-3"></a><span class="cm"> * @generated May 28, 2023, 9:37:49 AM</span>
<a id="__codelineno-7-4" name="__codelineno-7-4"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-7-5" name="__codelineno-7-5"></a><span class="cm"> * Copyright 2023 XUST. All rights reserved.</span>
<a id="__codelineno-7-6" name="__codelineno-7-6"></a><span class="cm"> */</span>
<a id="__codelineno-7-7" name="__codelineno-7-7"></a><span class="n">package</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">;</span>
<a id="__codelineno-7-8" name="__codelineno-7-8"></a>
<a id="__codelineno-7-9" name="__codelineno-7-9"></a><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="n">DecimalMax</span><span class="p">;</span>
<a id="__codelineno-7-10" name="__codelineno-7-10"></a><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="n">DecimalMin</span><span class="p">;</span>
<a id="__codelineno-7-11" name="__codelineno-7-11"></a><span class="o">//</span><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="n">Email</span><span class="p">;</span>
<a id="__codelineno-7-12" name="__codelineno-7-12"></a><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="k">Max</span><span class="p">;</span>
<a id="__codelineno-7-13" name="__codelineno-7-13"></a><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="k">Min</span><span class="p">;</span>
<a id="__codelineno-7-14" name="__codelineno-7-14"></a><span class="o">//</span><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="n">NotEmpty</span><span class="p">;</span>
<a id="__codelineno-7-15" name="__codelineno-7-15"></a><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="k">NotNull</span><span class="p">;</span>
<a id="__codelineno-7-16" name="__codelineno-7-16"></a><span class="n">import</span><span class="w"> </span><span class="n">javax</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="k">constraints</span><span class="p">.</span><span class="k">Size</span><span class="p">;</span>
<a id="__codelineno-7-17" name="__codelineno-7-17"></a><span class="n">import</span><span class="w"> </span><span class="n">com</span><span class="p">.</span><span class="n">fasterxml</span><span class="p">.</span><span class="n">jackson</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">JsonFormat</span><span class="p">;</span>
<a id="__codelineno-7-18" name="__codelineno-7-18"></a><span class="n">import</span><span class="w"> </span><span class="n">com</span><span class="p">.</span><span class="n">fasterxml</span><span class="p">.</span><span class="n">jackson</span><span class="p">.</span><span class="n">core</span><span class="p">.</span><span class="n">JsonProcessingException</span><span class="p">;</span>
<a id="__codelineno-7-19" name="__codelineno-7-19"></a><span class="n">import</span><span class="w"> </span><span class="n">com</span><span class="p">.</span><span class="n">fasterxml</span><span class="p">.</span><span class="n">jackson</span><span class="p">.</span><span class="n">databind</span><span class="p">.</span><span class="n">ObjectMapper</span><span class="p">;</span>
<a id="__codelineno-7-20" name="__codelineno-7-20"></a>
<a id="__codelineno-7-21" name="__codelineno-7-21"></a>
<a id="__codelineno-7-22" name="__codelineno-7-22"></a><span class="cm">/**</span>
<a id="__codelineno-7-23" name="__codelineno-7-23"></a><span class="cm"> * Class Student</span>
<a id="__codelineno-7-24" name="__codelineno-7-24"></a><span class="cm"> * 学生表</span>
<a id="__codelineno-7-25" name="__codelineno-7-25"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-7-26" name="__codelineno-7-26"></a><span class="cm"> * @version 1.0, 2023-04-20</span>
<a id="__codelineno-7-27" name="__codelineno-7-27"></a><span class="cm"> */</span>
<a id="__codelineno-7-28" name="__codelineno-7-28"></a><span class="k">public</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="n">Student</span><span class="err">{</span>
<a id="__codelineno-7-29" name="__codelineno-7-29"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">final</span><span class="w"> </span><span class="n">long</span><span class="w"> </span><span class="n">serialVersionUID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">-</span><span class="mi">8178158848305435288</span><span class="n">L</span><span class="p">;</span>
<a id="__codelineno-7-30" name="__codelineno-7-30"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">ObjectMapper</span><span class="w"> </span><span class="n">objectMapper</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ObjectMapper</span><span class="p">();</span>
<a id="__codelineno-7-31" name="__codelineno-7-31"></a>
<a id="__codelineno-7-32" name="__codelineno-7-32"></a>
<a id="__codelineno-7-33" name="__codelineno-7-33"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-7-34" name="__codelineno-7-34"></a><span class="cm">   * Id</span>
<a id="__codelineno-7-35" name="__codelineno-7-35"></a><span class="cm">   */</span>
<a id="__codelineno-7-36" name="__codelineno-7-36"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">id</span><span class="p">;</span>
<a id="__codelineno-7-37" name="__codelineno-7-37"></a>
<a id="__codelineno-7-38" name="__codelineno-7-38"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-7-39" name="__codelineno-7-39"></a><span class="cm">   * 学号</span>
<a id="__codelineno-7-40" name="__codelineno-7-40"></a><span class="cm">   */</span>
<a id="__codelineno-7-41" name="__codelineno-7-41"></a><span class="w">  </span><span class="o">@</span><span class="k">NotNull</span>
<a id="__codelineno-7-42" name="__codelineno-7-42"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="k">no</span><span class="p">;</span>
<a id="__codelineno-7-43" name="__codelineno-7-43"></a>
<a id="__codelineno-7-44" name="__codelineno-7-44"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-7-45" name="__codelineno-7-45"></a><span class="cm">   * 姓名</span>
<a id="__codelineno-7-46" name="__codelineno-7-46"></a><span class="cm">   */</span>
<a id="__codelineno-7-47" name="__codelineno-7-47"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">name</span><span class="p">;</span>
<a id="__codelineno-7-48" name="__codelineno-7-48"></a>
<a id="__codelineno-7-49" name="__codelineno-7-49"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-7-50" name="__codelineno-7-50"></a><span class="cm">   * 性别</span>
<a id="__codelineno-7-51" name="__codelineno-7-51"></a><span class="cm">   */</span>
<a id="__codelineno-7-52" name="__codelineno-7-52"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">gender</span><span class="p">;</span>
<a id="__codelineno-7-53" name="__codelineno-7-53"></a>
<a id="__codelineno-7-54" name="__codelineno-7-54"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-7-55" name="__codelineno-7-55"></a><span class="cm">   * 年龄</span>
<a id="__codelineno-7-56" name="__codelineno-7-56"></a><span class="cm">   */</span>
<a id="__codelineno-7-57" name="__codelineno-7-57"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="nb">Integer</span><span class="w"> </span><span class="n">age</span><span class="p">;</span>
<a id="__codelineno-7-58" name="__codelineno-7-58"></a>
<a id="__codelineno-7-59" name="__codelineno-7-59"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-7-60" name="__codelineno-7-60"></a><span class="cm">   * 所在系</span>
<a id="__codelineno-7-61" name="__codelineno-7-61"></a><span class="cm">   */</span>
<a id="__codelineno-7-62" name="__codelineno-7-62"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">dept</span><span class="p">;</span>
<a id="__codelineno-7-63" name="__codelineno-7-63"></a>
<a id="__codelineno-7-64" name="__codelineno-7-64"></a>
<a id="__codelineno-7-65" name="__codelineno-7-65"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-66" name="__codelineno-7-66"></a><span class="cm">     * Id</span>
<a id="__codelineno-7-67" name="__codelineno-7-67"></a><span class="cm">     */</span>
<a id="__codelineno-7-68" name="__codelineno-7-68"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">getId</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-7-69" name="__codelineno-7-69"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">id</span><span class="p">;</span>
<a id="__codelineno-7-70" name="__codelineno-7-70"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-71" name="__codelineno-7-71"></a>
<a id="__codelineno-7-72" name="__codelineno-7-72"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-73" name="__codelineno-7-73"></a><span class="cm">     * Id</span>
<a id="__codelineno-7-74" name="__codelineno-7-74"></a><span class="cm">     */</span>
<a id="__codelineno-7-75" name="__codelineno-7-75"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">setId</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-7-76" name="__codelineno-7-76"></a><span class="w">        </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">newValue</span><span class="p">;</span>
<a id="__codelineno-7-77" name="__codelineno-7-77"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-78" name="__codelineno-7-78"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-79" name="__codelineno-7-79"></a><span class="cm">     * 学号</span>
<a id="__codelineno-7-80" name="__codelineno-7-80"></a><span class="cm">     */</span>
<a id="__codelineno-7-81" name="__codelineno-7-81"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">getNo</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-7-82" name="__codelineno-7-82"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="k">no</span><span class="p">;</span>
<a id="__codelineno-7-83" name="__codelineno-7-83"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-84" name="__codelineno-7-84"></a>
<a id="__codelineno-7-85" name="__codelineno-7-85"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-86" name="__codelineno-7-86"></a><span class="cm">     * 学号</span>
<a id="__codelineno-7-87" name="__codelineno-7-87"></a><span class="cm">     */</span>
<a id="__codelineno-7-88" name="__codelineno-7-88"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">setNo</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-7-89" name="__codelineno-7-89"></a><span class="w">        </span><span class="k">no</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">newValue</span><span class="p">;</span>
<a id="__codelineno-7-90" name="__codelineno-7-90"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-91" name="__codelineno-7-91"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-92" name="__codelineno-7-92"></a><span class="cm">     * 姓名</span>
<a id="__codelineno-7-93" name="__codelineno-7-93"></a><span class="cm">     */</span>
<a id="__codelineno-7-94" name="__codelineno-7-94"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">getName</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-7-95" name="__codelineno-7-95"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">name</span><span class="p">;</span>
<a id="__codelineno-7-96" name="__codelineno-7-96"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-97" name="__codelineno-7-97"></a>
<a id="__codelineno-7-98" name="__codelineno-7-98"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-99" name="__codelineno-7-99"></a><span class="cm">     * 姓名</span>
<a id="__codelineno-7-100" name="__codelineno-7-100"></a><span class="cm">     */</span>
<a id="__codelineno-7-101" name="__codelineno-7-101"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">setName</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-7-102" name="__codelineno-7-102"></a><span class="w">        </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">newValue</span><span class="p">;</span>
<a id="__codelineno-7-103" name="__codelineno-7-103"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-104" name="__codelineno-7-104"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-105" name="__codelineno-7-105"></a><span class="cm">     * 性别</span>
<a id="__codelineno-7-106" name="__codelineno-7-106"></a><span class="cm">     */</span>
<a id="__codelineno-7-107" name="__codelineno-7-107"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">getGender</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-7-108" name="__codelineno-7-108"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">gender</span><span class="p">;</span>
<a id="__codelineno-7-109" name="__codelineno-7-109"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-110" name="__codelineno-7-110"></a>
<a id="__codelineno-7-111" name="__codelineno-7-111"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-112" name="__codelineno-7-112"></a><span class="cm">     * 性别</span>
<a id="__codelineno-7-113" name="__codelineno-7-113"></a><span class="cm">     */</span>
<a id="__codelineno-7-114" name="__codelineno-7-114"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">setGender</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-7-115" name="__codelineno-7-115"></a><span class="w">        </span><span class="n">gender</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">newValue</span><span class="p">;</span>
<a id="__codelineno-7-116" name="__codelineno-7-116"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-117" name="__codelineno-7-117"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-118" name="__codelineno-7-118"></a><span class="cm">     * 年龄</span>
<a id="__codelineno-7-119" name="__codelineno-7-119"></a><span class="cm">     */</span>
<a id="__codelineno-7-120" name="__codelineno-7-120"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="nb">Integer</span><span class="w"> </span><span class="n">getAge</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-7-121" name="__codelineno-7-121"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">age</span><span class="p">;</span>
<a id="__codelineno-7-122" name="__codelineno-7-122"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-123" name="__codelineno-7-123"></a>
<a id="__codelineno-7-124" name="__codelineno-7-124"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-125" name="__codelineno-7-125"></a><span class="cm">     * 年龄</span>
<a id="__codelineno-7-126" name="__codelineno-7-126"></a><span class="cm">     */</span>
<a id="__codelineno-7-127" name="__codelineno-7-127"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">setAge</span><span class="p">(</span><span class="nb">Integer</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-7-128" name="__codelineno-7-128"></a><span class="w">        </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">newValue</span><span class="p">;</span>
<a id="__codelineno-7-129" name="__codelineno-7-129"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-130" name="__codelineno-7-130"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-131" name="__codelineno-7-131"></a><span class="cm">     * 所在系</span>
<a id="__codelineno-7-132" name="__codelineno-7-132"></a><span class="cm">     */</span>
<a id="__codelineno-7-133" name="__codelineno-7-133"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">getDept</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-7-134" name="__codelineno-7-134"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">dept</span><span class="p">;</span>
<a id="__codelineno-7-135" name="__codelineno-7-135"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-136" name="__codelineno-7-136"></a>
<a id="__codelineno-7-137" name="__codelineno-7-137"></a><span class="w">    </span><span class="cm">/**</span>
<a id="__codelineno-7-138" name="__codelineno-7-138"></a><span class="cm">     * 所在系</span>
<a id="__codelineno-7-139" name="__codelineno-7-139"></a><span class="cm">     */</span>
<a id="__codelineno-7-140" name="__codelineno-7-140"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">setDept</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-7-141" name="__codelineno-7-141"></a><span class="w">        </span><span class="n">dept</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">newValue</span><span class="p">;</span>
<a id="__codelineno-7-142" name="__codelineno-7-142"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-7-143" name="__codelineno-7-143"></a>
<a id="__codelineno-7-144" name="__codelineno-7-144"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-7-145" name="__codelineno-7-145"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">toString</span><span class="p">()</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-7-146" name="__codelineno-7-146"></a><span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">&quot;&quot;</span><span class="p">;</span>
<a id="__codelineno-7-147" name="__codelineno-7-147"></a>
<a id="__codelineno-7-148" name="__codelineno-7-148"></a><span class="w">    </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-7-149" name="__codelineno-7-149"></a><span class="w">      </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">objectMapper</span><span class="p">.</span><span class="n">writeValueAsString</span><span class="p">(</span><span class="n">this</span><span class="p">);</span>
<a id="__codelineno-7-150" name="__codelineno-7-150"></a><span class="w">    </span><span class="err">}</span><span class="w"> </span><span class="n">catch</span><span class="w"> </span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-7-151" name="__codelineno-7-151"></a><span class="w">    </span><span class="err">}</span><span class="w">  </span>
<a id="__codelineno-7-152" name="__codelineno-7-152"></a>
<a id="__codelineno-7-153" name="__codelineno-7-153"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-7-154" name="__codelineno-7-154"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-7-155" name="__codelineno-7-155"></a><span class="err">}</span>
</code></pre></div></td></tr></table></div>
</details>
</li>
</ol>
<h3 id="crud">实现CRUD操作</h3>
<ol>
<li>
<p>创建<code>StudentMapper</code>接口，定义CRUD操作方法，如下所示：</p>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-8-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-8-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-8-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-8-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-8-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-8-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-8-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-8-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-8-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-8-10">10</a></span>
<span class="normal"><a href="#__codelineno-8-11">11</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-8-1" name="__codelineno-8-1"></a><span class="nd">@Mapper</span>
<a id="__codelineno-8-2" name="__codelineno-8-2"></a><span class="kd">public</span><span class="w"> </span><span class="kd">interface</span> <span class="nc">StudentDao</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-8-3" name="__codelineno-8-3"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">create</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-8-4" name="__codelineno-8-4"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">size</span><span class="p">(</span><span class="nd">@Param</span><span class="p">(</span><span class="s">&quot;params&quot;</span><span class="p">)</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-8-5" name="__codelineno-8-5"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">getPage</span><span class="p">(</span><span class="nd">@Param</span><span class="p">(</span><span class="s">&quot;params&quot;</span><span class="p">)</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="nd">@Param</span><span class="p">(</span><span class="s">&quot;pageNum&quot;</span><span class="p">)</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">pageNum</span><span class="p">,</span><span class="w"> </span><span class="nd">@Param</span><span class="p">(</span><span class="s">&quot;pageSize&quot;</span><span class="p">)</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">pageSize</span><span class="p">);</span>
<a id="__codelineno-8-6" name="__codelineno-8-6"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">getItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">items</span><span class="p">);</span>
<a id="__codelineno-8-7" name="__codelineno-8-7"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">update</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-8-8" name="__codelineno-8-8"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">deleteItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ids</span><span class="p">);</span>
<a id="__codelineno-8-9" name="__codelineno-8-9"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">deleteAll</span><span class="p">();</span>
<a id="__codelineno-8-10" name="__codelineno-8-10"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">delete</span><span class="p">(</span><span class="nd">@Param</span><span class="p">(</span><span class="s">&quot;params&quot;</span><span class="p">)</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-8-11" name="__codelineno-8-11"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>StudentDao.java</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/java/xust/stu/demo/dao/StudentDao.java</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-9-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-9-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-9-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-9-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-9-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-9-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-9-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-9-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-9-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-9-10">10</a></span>
<span class="normal"><a href="#__codelineno-9-11">11</a></span>
<span class="normal"><a href="#__codelineno-9-12">12</a></span>
<span class="normal"><a href="#__codelineno-9-13">13</a></span>
<span class="normal"><a href="#__codelineno-9-14">14</a></span>
<span class="normal"><a href="#__codelineno-9-15">15</a></span>
<span class="normal"><a href="#__codelineno-9-16">16</a></span>
<span class="normal"><a href="#__codelineno-9-17">17</a></span>
<span class="normal"><a href="#__codelineno-9-18">18</a></span>
<span class="normal"><a href="#__codelineno-9-19">19</a></span>
<span class="normal"><a href="#__codelineno-9-20">20</a></span>
<span class="normal"><a href="#__codelineno-9-21">21</a></span>
<span class="normal"><a href="#__codelineno-9-22">22</a></span>
<span class="normal"><a href="#__codelineno-9-23">23</a></span>
<span class="normal"><a href="#__codelineno-9-24">24</a></span>
<span class="normal"><a href="#__codelineno-9-25">25</a></span>
<span class="normal"><a href="#__codelineno-9-26">26</a></span>
<span class="normal"><a href="#__codelineno-9-27">27</a></span>
<span class="normal"><a href="#__codelineno-9-28">28</a></span>
<span class="normal"><a href="#__codelineno-9-29">29</a></span>
<span class="normal"><a href="#__codelineno-9-30">30</a></span>
<span class="normal"><a href="#__codelineno-9-31">31</a></span>
<span class="normal"><a href="#__codelineno-9-32">32</a></span>
<span class="normal"><a href="#__codelineno-9-33">33</a></span>
<span class="normal"><a href="#__codelineno-9-34">34</a></span>
<span class="normal"><a href="#__codelineno-9-35">35</a></span>
<span class="normal"><a href="#__codelineno-9-36">36</a></span>
<span class="normal"><a href="#__codelineno-9-37">37</a></span>
<span class="normal"><a href="#__codelineno-9-38">38</a></span>
<span class="normal"><a href="#__codelineno-9-39">39</a></span>
<span class="normal"><a href="#__codelineno-9-40">40</a></span>
<span class="normal"><a href="#__codelineno-9-41">41</a></span>
<span class="normal"><a href="#__codelineno-9-42">42</a></span>
<span class="normal"><a href="#__codelineno-9-43">43</a></span>
<span class="normal"><a href="#__codelineno-9-44">44</a></span>
<span class="normal"><a href="#__codelineno-9-45">45</a></span>
<span class="normal"><a href="#__codelineno-9-46">46</a></span>
<span class="normal"><a href="#__codelineno-9-47">47</a></span>
<span class="normal"><a href="#__codelineno-9-48">48</a></span>
<span class="normal"><a href="#__codelineno-9-49">49</a></span>
<span class="normal"><a href="#__codelineno-9-50">50</a></span>
<span class="normal"><a href="#__codelineno-9-51">51</a></span>
<span class="normal"><a href="#__codelineno-9-52">52</a></span>
<span class="normal"><a href="#__codelineno-9-53">53</a></span>
<span class="normal"><a href="#__codelineno-9-54">54</a></span>
<span class="normal"><a href="#__codelineno-9-55">55</a></span>
<span class="normal"><a href="#__codelineno-9-56">56</a></span>
<span class="normal"><a href="#__codelineno-9-57">57</a></span>
<span class="normal"><a href="#__codelineno-9-58">58</a></span>
<span class="normal"><a href="#__codelineno-9-59">59</a></span>
<span class="normal"><a href="#__codelineno-9-60">60</a></span>
<span class="normal"><a href="#__codelineno-9-61">61</a></span>
<span class="normal"><a href="#__codelineno-9-62">62</a></span>
<span class="normal"><a href="#__codelineno-9-63">63</a></span>
<span class="normal"><a href="#__codelineno-9-64">64</a></span>
<span class="normal"><a href="#__codelineno-9-65">65</a></span>
<span class="normal"><a href="#__codelineno-9-66">66</a></span>
<span class="normal"><a href="#__codelineno-9-67">67</a></span>
<span class="normal"><a href="#__codelineno-9-68">68</a></span>
<span class="normal"><a href="#__codelineno-9-69">69</a></span>
<span class="normal"><a href="#__codelineno-9-70">70</a></span>
<span class="normal"><a href="#__codelineno-9-71">71</a></span>
<span class="normal"><a href="#__codelineno-9-72">72</a></span>
<span class="normal"><a href="#__codelineno-9-73">73</a></span>
<span class="normal"><a href="#__codelineno-9-74">74</a></span>
<span class="normal"><a href="#__codelineno-9-75">75</a></span>
<span class="normal"><a href="#__codelineno-9-76">76</a></span>
<span class="normal"><a href="#__codelineno-9-77">77</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1"></a><span class="cm">/*</span>
<a id="__codelineno-9-2" name="__codelineno-9-2"></a><span class="cm"> * File name : Student.java 2023-04-20</span>
<a id="__codelineno-9-3" name="__codelineno-9-3"></a><span class="cm"> * @generated May 28, 2023, 9:37:49 AM</span>
<a id="__codelineno-9-4" name="__codelineno-9-4"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-9-5" name="__codelineno-9-5"></a><span class="cm"> * Copyright 2023 XUST. All rights reserved.</span>
<a id="__codelineno-9-6" name="__codelineno-9-6"></a><span class="cm"> */</span>
<a id="__codelineno-9-7" name="__codelineno-9-7"></a><span class="n">package</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="n">dao</span><span class="p">;</span>
<a id="__codelineno-9-8" name="__codelineno-9-8"></a>
<a id="__codelineno-9-9" name="__codelineno-9-9"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">ibatis</span><span class="p">.</span><span class="n">annotations</span><span class="p">.</span><span class="n">Mapper</span><span class="p">;</span>
<a id="__codelineno-9-10" name="__codelineno-9-10"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">ibatis</span><span class="p">.</span><span class="n">annotations</span><span class="p">.</span><span class="n">Param</span><span class="p">;</span>
<a id="__codelineno-9-11" name="__codelineno-9-11"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="k">Map</span><span class="p">;</span>
<a id="__codelineno-9-12" name="__codelineno-9-12"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">List</span><span class="p">;</span>
<a id="__codelineno-9-13" name="__codelineno-9-13"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">.</span><span class="n">Student</span><span class="p">;</span>
<a id="__codelineno-9-14" name="__codelineno-9-14"></a>
<a id="__codelineno-9-15" name="__codelineno-9-15"></a><span class="cm">/**</span>
<a id="__codelineno-9-16" name="__codelineno-9-16"></a><span class="cm"> * StudentDao</span>
<a id="__codelineno-9-17" name="__codelineno-9-17"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-9-18" name="__codelineno-9-18"></a><span class="cm"> * @version 1.0, 2023-04-20</span>
<a id="__codelineno-9-19" name="__codelineno-9-19"></a><span class="cm"> */</span>
<a id="__codelineno-9-20" name="__codelineno-9-20"></a><span class="o">@</span><span class="n">Mapper</span>
<a id="__codelineno-9-21" name="__codelineno-9-21"></a><span class="k">public</span><span class="w"> </span><span class="n">interface</span><span class="w"> </span><span class="n">StudentDao</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-9-22" name="__codelineno-9-22"></a>
<a id="__codelineno-9-23" name="__codelineno-9-23"></a><span class="w">  </span><span class="o">/////////////////////</span><span class="w"> </span><span class="k">Create</span>
<a id="__codelineno-9-24" name="__codelineno-9-24"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-25" name="__codelineno-9-25"></a><span class="cm">   * 创建对象</span>
<a id="__codelineno-9-26" name="__codelineno-9-26"></a><span class="cm">   * @param newValue 新对象</span>
<a id="__codelineno-9-27" name="__codelineno-9-27"></a><span class="cm">   * @return 影响行数，1为成功，0为失败</span>
<a id="__codelineno-9-28" name="__codelineno-9-28"></a><span class="cm">   */</span>
<a id="__codelineno-9-29" name="__codelineno-9-29"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="k">create</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-9-30" name="__codelineno-9-30"></a>
<a id="__codelineno-9-31" name="__codelineno-9-31"></a><span class="w">  </span><span class="o">/////////////////////</span><span class="w"> </span><span class="n">Retrie</span>
<a id="__codelineno-9-32" name="__codelineno-9-32"></a>
<a id="__codelineno-9-33" name="__codelineno-9-33"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-34" name="__codelineno-9-34"></a><span class="cm">   * 获取对象数量</span>
<a id="__codelineno-9-35" name="__codelineno-9-35"></a><span class="cm">   * @param params 并参数</span>
<a id="__codelineno-9-36" name="__codelineno-9-36"></a><span class="cm">   * @return 非空新对象，非空Integer对象</span>
<a id="__codelineno-9-37" name="__codelineno-9-37"></a><span class="cm">   */</span>
<a id="__codelineno-9-38" name="__codelineno-9-38"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="k">size</span><span class="p">(</span><span class="o">@</span><span class="n">Param</span><span class="p">(</span><span class="ss">&quot;params&quot;</span><span class="p">)</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-9-39" name="__codelineno-9-39"></a>
<a id="__codelineno-9-40" name="__codelineno-9-40"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-41" name="__codelineno-9-41"></a><span class="cm">   * 获取对象分页</span>
<a id="__codelineno-9-42" name="__codelineno-9-42"></a><span class="cm">   * @param params 并参数</span>
<a id="__codelineno-9-43" name="__codelineno-9-43"></a><span class="cm">   * @return 非空对象列表</span>
<a id="__codelineno-9-44" name="__codelineno-9-44"></a><span class="cm">   */</span>
<a id="__codelineno-9-45" name="__codelineno-9-45"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="n">getPage</span><span class="p">(</span><span class="o">@</span><span class="n">Param</span><span class="p">(</span><span class="ss">&quot;params&quot;</span><span class="p">)</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="o">@</span><span class="n">Param</span><span class="p">(</span><span class="ss">&quot;pageNum&quot;</span><span class="p">)</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">pageNum</span><span class="p">,</span><span class="w"> </span><span class="o">@</span><span class="n">Param</span><span class="p">(</span><span class="ss">&quot;pageSize&quot;</span><span class="p">)</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">pageSize</span><span class="p">);</span>
<a id="__codelineno-9-46" name="__codelineno-9-46"></a>
<a id="__codelineno-9-47" name="__codelineno-9-47"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-48" name="__codelineno-9-48"></a><span class="cm">   * 获取对象列表</span>
<a id="__codelineno-9-49" name="__codelineno-9-49"></a><span class="cm">   * @param items id列表</span>
<a id="__codelineno-9-50" name="__codelineno-9-50"></a><span class="cm">   * @return 非空对象列表</span>
<a id="__codelineno-9-51" name="__codelineno-9-51"></a><span class="cm">   */</span>
<a id="__codelineno-9-52" name="__codelineno-9-52"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="n">getItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">items</span><span class="p">);</span>
<a id="__codelineno-9-53" name="__codelineno-9-53"></a>
<a id="__codelineno-9-54" name="__codelineno-9-54"></a><span class="w">  </span><span class="o">/////////////////////</span><span class="w"> </span><span class="k">Update</span>
<a id="__codelineno-9-55" name="__codelineno-9-55"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-56" name="__codelineno-9-56"></a><span class="cm">   * 更新对象</span>
<a id="__codelineno-9-57" name="__codelineno-9-57"></a><span class="cm">   * @param newValue 新值</span>
<a id="__codelineno-9-58" name="__codelineno-9-58"></a><span class="cm">   * @return 非空Integer对象</span>
<a id="__codelineno-9-59" name="__codelineno-9-59"></a><span class="cm">   */</span>
<a id="__codelineno-9-60" name="__codelineno-9-60"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="k">update</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-9-61" name="__codelineno-9-61"></a>
<a id="__codelineno-9-62" name="__codelineno-9-62"></a><span class="w">  </span><span class="o">/////////////////////</span><span class="w"> </span><span class="k">Delete</span>
<a id="__codelineno-9-63" name="__codelineno-9-63"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-64" name="__codelineno-9-64"></a><span class="cm">   * 删除对象</span>
<a id="__codelineno-9-65" name="__codelineno-9-65"></a><span class="cm">   * @param ids id列表</span>
<a id="__codelineno-9-66" name="__codelineno-9-66"></a><span class="cm">   * @return 非空Integer对象</span>
<a id="__codelineno-9-67" name="__codelineno-9-67"></a><span class="cm">   */</span>
<a id="__codelineno-9-68" name="__codelineno-9-68"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">deleteItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ids</span><span class="p">);</span>
<a id="__codelineno-9-69" name="__codelineno-9-69"></a>
<a id="__codelineno-9-70" name="__codelineno-9-70"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-9-71" name="__codelineno-9-71"></a><span class="cm">   * 删除对象</span>
<a id="__codelineno-9-72" name="__codelineno-9-72"></a><span class="cm">   * @return 非空Integer对象</span>
<a id="__codelineno-9-73" name="__codelineno-9-73"></a><span class="cm">   */</span>
<a id="__codelineno-9-74" name="__codelineno-9-74"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">deleteAll</span><span class="p">();</span>
<a id="__codelineno-9-75" name="__codelineno-9-75"></a>
<a id="__codelineno-9-76" name="__codelineno-9-76"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="k">delete</span><span class="p">(</span><span class="o">@</span><span class="n">Param</span><span class="p">(</span><span class="ss">&quot;params&quot;</span><span class="p">)</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-9-77" name="__codelineno-9-77"></a><span class="err">}</span>
</code></pre></div></td></tr></table></div>
</details>
</li>
<li>
<p>创建<code>StudentMapper.xml</code>文件，实现CRUD操作，如下所示：</p>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-10-1">1</a></span>
<span class="normal"><a href="#__codelineno-10-2">2</a></span>
<span class="normal"><a href="#__codelineno-10-3">3</a></span>
<span class="normal"><a href="#__codelineno-10-4">4</a></span>
<span class="normal"><a href="#__codelineno-10-5">5</a></span>
<span class="normal"><a href="#__codelineno-10-6">6</a></span>
<span class="normal"><a href="#__codelineno-10-7">7</a></span>
<span class="normal"><a href="#__codelineno-10-8">8</a></span>
<span class="normal"><a href="#__codelineno-10-9">9</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-10-1" name="__codelineno-10-1"></a><span class="nt">&lt;mapper</span><span class="w"> </span><span class="na">namespace=</span><span class="s">&quot;xust.stu.demo.dao.StudentDao&quot;</span><span class="nt">&gt;</span>
<a id="__codelineno-10-2" name="__codelineno-10-2"></a><span class="w">  </span><span class="cm">&lt;!-- Create --&gt;</span>
<a id="__codelineno-10-3" name="__codelineno-10-3"></a><span class="w">  </span><span class="nt">&lt;insert</span><span class="w"> </span><span class="na">id=</span><span class="s">&quot;create&quot;</span><span class="w"> </span><span class="na">parameterType=</span><span class="s">&quot;xust.stu.demo.domain.Student&quot;</span><span class="nt">&gt;</span>
<a id="__codelineno-10-4" name="__codelineno-10-4"></a><span class="w">    </span><span class="cp">&lt;![CDATA[insert into Student(Id,no,name,gender,age,dept) </span>
<a id="__codelineno-10-5" name="__codelineno-10-5"></a><span class="cp">    values(#{id},#{no},#{name},#{gender},#{age},#{dept})]]&gt;</span>
<a id="__codelineno-10-6" name="__codelineno-10-6"></a><span class="w">  </span><span class="nt">&lt;/insert&gt;</span>
<a id="__codelineno-10-7" name="__codelineno-10-7"></a>
<a id="__codelineno-10-8" name="__codelineno-10-8"></a><span class="w">  </span><span class="cm">&lt;!-- ... --&gt;</span>
<a id="__codelineno-10-9" name="__codelineno-10-9"></a><span class="nt">&lt;/mapper&gt;</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>StudentDao.xml</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/resources/mapper/DEMO_StudentDao.xml</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-11-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-11-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-11-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-11-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-11-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-11-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-11-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-11-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-11-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-11-10">10</a></span>
<span class="normal"><a href="#__codelineno-11-11">11</a></span>
<span class="normal"><a href="#__codelineno-11-12">12</a></span>
<span class="normal"><a href="#__codelineno-11-13">13</a></span>
<span class="normal"><a href="#__codelineno-11-14">14</a></span>
<span class="normal"><a href="#__codelineno-11-15">15</a></span>
<span class="normal"><a href="#__codelineno-11-16">16</a></span>
<span class="normal"><a href="#__codelineno-11-17">17</a></span>
<span class="normal"><a href="#__codelineno-11-18">18</a></span>
<span class="normal"><a href="#__codelineno-11-19">19</a></span>
<span class="normal"><a href="#__codelineno-11-20">20</a></span>
<span class="normal"><a href="#__codelineno-11-21">21</a></span>
<span class="normal"><a href="#__codelineno-11-22">22</a></span>
<span class="normal"><a href="#__codelineno-11-23">23</a></span>
<span class="normal"><a href="#__codelineno-11-24">24</a></span>
<span class="normal"><a href="#__codelineno-11-25">25</a></span>
<span class="normal"><a href="#__codelineno-11-26">26</a></span>
<span class="normal"><a href="#__codelineno-11-27">27</a></span>
<span class="normal"><a href="#__codelineno-11-28">28</a></span>
<span class="normal"><a href="#__codelineno-11-29">29</a></span>
<span class="normal"><a href="#__codelineno-11-30">30</a></span>
<span class="normal"><a href="#__codelineno-11-31">31</a></span>
<span class="normal"><a href="#__codelineno-11-32">32</a></span>
<span class="normal"><a href="#__codelineno-11-33">33</a></span>
<span class="normal"><a href="#__codelineno-11-34">34</a></span>
<span class="normal"><a href="#__codelineno-11-35">35</a></span>
<span class="normal"><a href="#__codelineno-11-36">36</a></span>
<span class="normal"><a href="#__codelineno-11-37">37</a></span>
<span class="normal"><a href="#__codelineno-11-38">38</a></span>
<span class="normal"><a href="#__codelineno-11-39">39</a></span>
<span class="normal"><a href="#__codelineno-11-40">40</a></span>
<span class="normal"><a href="#__codelineno-11-41">41</a></span>
<span class="normal"><a href="#__codelineno-11-42">42</a></span>
<span class="normal"><a href="#__codelineno-11-43">43</a></span>
<span class="normal"><a href="#__codelineno-11-44">44</a></span>
<span class="normal"><a href="#__codelineno-11-45">45</a></span>
<span class="normal"><a href="#__codelineno-11-46">46</a></span>
<span class="normal"><a href="#__codelineno-11-47">47</a></span>
<span class="normal"><a href="#__codelineno-11-48">48</a></span>
<span class="normal"><a href="#__codelineno-11-49">49</a></span>
<span class="normal"><a href="#__codelineno-11-50">50</a></span>
<span class="normal"><a href="#__codelineno-11-51">51</a></span>
<span class="normal"><a href="#__codelineno-11-52">52</a></span>
<span class="normal"><a href="#__codelineno-11-53">53</a></span>
<span class="normal"><a href="#__codelineno-11-54">54</a></span>
<span class="normal"><a href="#__codelineno-11-55">55</a></span>
<span class="normal"><a href="#__codelineno-11-56">56</a></span>
<span class="normal"><a href="#__codelineno-11-57">57</a></span>
<span class="normal"><a href="#__codelineno-11-58">58</a></span>
<span class="normal"><a href="#__codelineno-11-59">59</a></span>
<span class="normal"><a href="#__codelineno-11-60">60</a></span>
<span class="normal"><a href="#__codelineno-11-61">61</a></span>
<span class="normal"><a href="#__codelineno-11-62">62</a></span>
<span class="normal"><a href="#__codelineno-11-63">63</a></span>
<span class="normal"><a href="#__codelineno-11-64">64</a></span>
<span class="normal"><a href="#__codelineno-11-65">65</a></span>
<span class="normal"><a href="#__codelineno-11-66">66</a></span>
<span class="normal"><a href="#__codelineno-11-67">67</a></span>
<span class="normal"><a href="#__codelineno-11-68">68</a></span>
<span class="normal"><a href="#__codelineno-11-69">69</a></span>
<span class="normal"><a href="#__codelineno-11-70">70</a></span>
<span class="normal"><a href="#__codelineno-11-71">71</a></span>
<span class="normal"><a href="#__codelineno-11-72">72</a></span>
<span class="normal"><a href="#__codelineno-11-73">73</a></span>
<span class="normal"><a href="#__codelineno-11-74">74</a></span>
<span class="normal"><a href="#__codelineno-11-75">75</a></span>
<span class="normal"><a href="#__codelineno-11-76">76</a></span>
<span class="normal"><a href="#__codelineno-11-77">77</a></span>
<span class="normal"><a href="#__codelineno-11-78">78</a></span>
<span class="normal"><a href="#__codelineno-11-79">79</a></span>
<span class="normal"><a href="#__codelineno-11-80">80</a></span>
<span class="normal"><a href="#__codelineno-11-81">81</a></span>
<span class="normal"><a href="#__codelineno-11-82">82</a></span>
<span class="normal"><a href="#__codelineno-11-83">83</a></span>
<span class="normal"><a href="#__codelineno-11-84">84</a></span>
<span class="normal"><a href="#__codelineno-11-85">85</a></span>
<span class="normal"><a href="#__codelineno-11-86">86</a></span>
<span class="normal"><a href="#__codelineno-11-87">87</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-11-1" name="__codelineno-11-1"></a><span class="o">&lt;?</span><span class="n">xml</span><span class="w"> </span><span class="k">version</span><span class="o">=</span><span class="ss">&quot;1.0&quot;</span><span class="w"> </span><span class="k">encoding</span><span class="o">=</span><span class="ss">&quot;UTF-8&quot;</span><span class="w"> </span><span class="o">?&gt;</span>
<a id="__codelineno-11-2" name="__codelineno-11-2"></a><span class="o">&lt;!</span><span class="n">DOCTYPE</span><span class="w"> </span><span class="n">mapper</span><span class="w"> </span><span class="k">PUBLIC</span><span class="w"> </span><span class="ss">&quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;</span><span class="w"> </span><span class="ss">&quot;http://mybatis.org/dtd/mybatis-3-mapper.dtd&quot;</span><span class="w"> </span><span class="o">&gt;</span>
<a id="__codelineno-11-3" name="__codelineno-11-3"></a>
<a id="__codelineno-11-4" name="__codelineno-11-4"></a><span class="o">&lt;</span><span class="n">mapper</span><span class="w"> </span><span class="n">namespace</span><span class="o">=</span><span class="ss">&quot;xust.stu.demo.dao.StudentDao&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-5" name="__codelineno-11-5"></a>
<a id="__codelineno-11-6" name="__codelineno-11-6"></a><span class="w">  </span><span class="o">&lt;</span><span class="n">resultMap</span><span class="w"> </span><span class="k">type</span><span class="o">=</span><span class="ss">&quot;xust.stu.demo.domain.Student&quot;</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;studentResult&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-7" name="__codelineno-11-7"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">result</span><span class="w"> </span><span class="n">property</span><span class="o">=</span><span class="ss">&quot;id&quot;</span><span class="w"> </span><span class="k">column</span><span class="o">=</span><span class="ss">&quot;ID&quot;</span><span class="o">&gt;&lt;/</span><span class="k">result</span><span class="o">&gt;</span>
<a id="__codelineno-11-8" name="__codelineno-11-8"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">result</span><span class="w"> </span><span class="n">property</span><span class="o">=</span><span class="ss">&quot;no&quot;</span><span class="w"> </span><span class="k">column</span><span class="o">=</span><span class="ss">&quot;NO&quot;</span><span class="o">&gt;&lt;/</span><span class="k">result</span><span class="o">&gt;</span>
<a id="__codelineno-11-9" name="__codelineno-11-9"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">result</span><span class="w"> </span><span class="n">property</span><span class="o">=</span><span class="ss">&quot;name&quot;</span><span class="w"> </span><span class="k">column</span><span class="o">=</span><span class="ss">&quot;NAME&quot;</span><span class="o">&gt;&lt;/</span><span class="k">result</span><span class="o">&gt;</span>
<a id="__codelineno-11-10" name="__codelineno-11-10"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">result</span><span class="w"> </span><span class="n">property</span><span class="o">=</span><span class="ss">&quot;gender&quot;</span><span class="w"> </span><span class="k">column</span><span class="o">=</span><span class="ss">&quot;GENDER&quot;</span><span class="o">&gt;&lt;/</span><span class="k">result</span><span class="o">&gt;</span>
<a id="__codelineno-11-11" name="__codelineno-11-11"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">result</span><span class="w"> </span><span class="n">property</span><span class="o">=</span><span class="ss">&quot;age&quot;</span><span class="w"> </span><span class="k">column</span><span class="o">=</span><span class="ss">&quot;AGE&quot;</span><span class="o">&gt;&lt;/</span><span class="k">result</span><span class="o">&gt;</span>
<a id="__codelineno-11-12" name="__codelineno-11-12"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">result</span><span class="w"> </span><span class="n">property</span><span class="o">=</span><span class="ss">&quot;dept&quot;</span><span class="w"> </span><span class="k">column</span><span class="o">=</span><span class="ss">&quot;DEPT&quot;</span><span class="o">&gt;&lt;/</span><span class="k">result</span><span class="o">&gt;</span>
<a id="__codelineno-11-13" name="__codelineno-11-13"></a><span class="w">  </span><span class="o">&lt;/</span><span class="n">resultMap</span><span class="o">&gt;</span>
<a id="__codelineno-11-14" name="__codelineno-11-14"></a>
<a id="__codelineno-11-15" name="__codelineno-11-15"></a><span class="w">  </span><span class="o">&lt;!</span><span class="c1">-- Create --&gt;</span>
<a id="__codelineno-11-16" name="__codelineno-11-16"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">insert</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;create&quot;</span><span class="w"> </span><span class="n">parameterType</span><span class="o">=</span><span class="ss">&quot;xust.stu.demo.domain.Student&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-17" name="__codelineno-11-17"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">insert</span><span class="w"> </span><span class="k">into</span><span class="w"> </span><span class="n">Student</span><span class="p">(</span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="p">)</span><span class="w"> </span>
<a id="__codelineno-11-18" name="__codelineno-11-18"></a><span class="w">    </span><span class="k">values</span><span class="p">(</span><span class="o">#</span><span class="err">{</span><span class="n">id</span><span class="err">}</span><span class="p">,</span><span class="o">#</span><span class="err">{</span><span class="k">no</span><span class="err">}</span><span class="p">,</span><span class="o">#</span><span class="err">{</span><span class="n">name</span><span class="err">}</span><span class="p">,</span><span class="o">#</span><span class="err">{</span><span class="n">gender</span><span class="err">}</span><span class="p">,</span><span class="o">#</span><span class="err">{</span><span class="n">age</span><span class="err">}</span><span class="p">,</span><span class="o">#</span><span class="err">{</span><span class="n">dept</span><span class="err">}</span><span class="p">)]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-19" name="__codelineno-11-19"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">insert</span><span class="o">&gt;</span>
<a id="__codelineno-11-20" name="__codelineno-11-20"></a>
<a id="__codelineno-11-21" name="__codelineno-11-21"></a><span class="w">  </span><span class="o">&lt;!</span><span class="c1">-- Retriev data --&gt;</span>
<a id="__codelineno-11-22" name="__codelineno-11-22"></a><span class="w">  </span><span class="o">&lt;!</span><span class="c1">-- Retrieve data by id --&gt;</span>
<a id="__codelineno-11-23" name="__codelineno-11-23"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">select</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;size&quot;</span><span class="w"> </span><span class="n">resultType</span><span class="o">=</span><span class="ss">&quot;int&quot;</span><span class="w"> </span><span class="n">parameterType</span><span class="o">=</span><span class="ss">&quot;map&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-24" name="__codelineno-11-24"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">select</span><span class="w"> </span><span class="k">count</span><span class="p">(</span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">Student</span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-25" name="__codelineno-11-25"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">where</span><span class="o">&gt;</span>
<a id="__codelineno-11-26" name="__codelineno-11-26"></a><span class="w">      </span><span class="mi">1</span><span class="o">=</span><span class="mi">1</span>
<a id="__codelineno-11-27" name="__codelineno-11-27"></a><span class="w">      </span><span class="o">&lt;</span><span class="k">if</span><span class="w"> </span><span class="n">test</span><span class="o">=</span><span class="ss">&quot;params.id != null and params.id != &#39;&#39;&quot;</span><span class="o">&gt;</span><span class="k">and</span><span class="w"> </span><span class="n">Id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">#</span><span class="err">{</span><span class="n">params</span><span class="p">.</span><span class="n">id</span><span class="err">}</span><span class="o">&lt;/</span><span class="k">if</span><span class="o">&gt;</span>
<a id="__codelineno-11-28" name="__codelineno-11-28"></a><span class="w">      </span><span class="o">&lt;</span><span class="k">if</span><span class="w"> </span><span class="n">test</span><span class="o">=</span><span class="ss">&quot;params.ids != null and params.ids.size &gt; 0&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-29" name="__codelineno-11-29"></a><span class="w">        </span><span class="k">and</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span>
<a id="__codelineno-11-30" name="__codelineno-11-30"></a><span class="w">        </span><span class="o">&lt;</span><span class="n">foreach</span><span class="w"> </span><span class="n">item</span><span class="o">=</span><span class="ss">&quot;item&quot;</span><span class="w"> </span><span class="k">index</span><span class="o">=</span><span class="ss">&quot;index&quot;</span><span class="w"> </span><span class="n">collection</span><span class="o">=</span><span class="ss">&quot;params.ids&quot;</span><span class="w"> </span><span class="k">open</span><span class="o">=</span><span class="ss">&quot;(&quot;</span><span class="w"> </span><span class="n">separator</span><span class="o">=</span><span class="ss">&quot;,&quot;</span><span class="w"> </span><span class="k">close</span><span class="o">=</span><span class="ss">&quot;)&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-31" name="__codelineno-11-31"></a><span class="w">        </span><span class="o">#</span><span class="err">{</span><span class="n">item</span><span class="err">}</span>
<a id="__codelineno-11-32" name="__codelineno-11-32"></a><span class="w">        </span><span class="o">&lt;/</span><span class="n">foreach</span><span class="o">&gt;</span>
<a id="__codelineno-11-33" name="__codelineno-11-33"></a><span class="w">      </span><span class="o">&lt;/</span><span class="k">if</span><span class="o">&gt;</span>
<a id="__codelineno-11-34" name="__codelineno-11-34"></a><span class="w">    </span><span class="o">&lt;/</span><span class="k">where</span><span class="o">&gt;</span>
<a id="__codelineno-11-35" name="__codelineno-11-35"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">select</span><span class="o">&gt;</span>
<a id="__codelineno-11-36" name="__codelineno-11-36"></a>
<a id="__codelineno-11-37" name="__codelineno-11-37"></a><span class="w">  </span><span class="o">&lt;!</span><span class="c1">-- Retrieve data by page--&gt;</span>
<a id="__codelineno-11-38" name="__codelineno-11-38"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">select</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;getPage&quot;</span><span class="w"> </span><span class="n">resultMap</span><span class="o">=</span><span class="ss">&quot;studentResult&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-39" name="__codelineno-11-39"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">select</span><span class="w"> </span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">Student</span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-40" name="__codelineno-11-40"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">where</span><span class="o">&gt;</span>
<a id="__codelineno-11-41" name="__codelineno-11-41"></a><span class="w">      </span><span class="mi">1</span><span class="o">=</span><span class="mi">1</span>
<a id="__codelineno-11-42" name="__codelineno-11-42"></a><span class="w">      </span><span class="o">&lt;</span><span class="k">if</span><span class="w"> </span><span class="n">test</span><span class="o">=</span><span class="ss">&quot;params.id != null and params.id != &#39;&#39;&quot;</span><span class="o">&gt;</span><span class="k">and</span><span class="w"> </span><span class="n">Id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">#</span><span class="err">{</span><span class="n">params</span><span class="p">.</span><span class="n">id</span><span class="err">}</span><span class="o">&lt;/</span><span class="k">if</span><span class="o">&gt;</span>
<a id="__codelineno-11-43" name="__codelineno-11-43"></a><span class="w">      </span><span class="o">&lt;</span><span class="k">if</span><span class="w"> </span><span class="n">test</span><span class="o">=</span><span class="ss">&quot;params.ids != null and params.ids.size &gt; 0&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-44" name="__codelineno-11-44"></a><span class="w">        </span><span class="k">and</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span>
<a id="__codelineno-11-45" name="__codelineno-11-45"></a><span class="w">        </span><span class="o">&lt;</span><span class="n">foreach</span><span class="w"> </span><span class="n">item</span><span class="o">=</span><span class="ss">&quot;item&quot;</span><span class="w"> </span><span class="k">index</span><span class="o">=</span><span class="ss">&quot;index&quot;</span><span class="w"> </span><span class="n">collection</span><span class="o">=</span><span class="ss">&quot;params.ids&quot;</span><span class="w"> </span><span class="k">open</span><span class="o">=</span><span class="ss">&quot;(&quot;</span><span class="w"> </span><span class="n">separator</span><span class="o">=</span><span class="ss">&quot;,&quot;</span><span class="w"> </span><span class="k">close</span><span class="o">=</span><span class="ss">&quot;)&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-46" name="__codelineno-11-46"></a><span class="w">        </span><span class="o">#</span><span class="err">{</span><span class="n">item</span><span class="err">}</span>
<a id="__codelineno-11-47" name="__codelineno-11-47"></a><span class="w">        </span><span class="o">&lt;/</span><span class="n">foreach</span><span class="o">&gt;</span>
<a id="__codelineno-11-48" name="__codelineno-11-48"></a><span class="w">      </span><span class="o">&lt;/</span><span class="k">if</span><span class="o">&gt;</span>
<a id="__codelineno-11-49" name="__codelineno-11-49"></a><span class="w">    </span><span class="o">&lt;/</span><span class="k">where</span><span class="o">&gt;</span>
<a id="__codelineno-11-50" name="__codelineno-11-50"></a><span class="w">    </span><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">desc</span>
<a id="__codelineno-11-51" name="__codelineno-11-51"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">select</span><span class="o">&gt;</span>
<a id="__codelineno-11-52" name="__codelineno-11-52"></a>
<a id="__codelineno-11-53" name="__codelineno-11-53"></a><span class="w">    </span><span class="o">&lt;!</span><span class="c1">-- Retrieve data by page--&gt;</span>
<a id="__codelineno-11-54" name="__codelineno-11-54"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">select</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;getItems&quot;</span><span class="w"> </span><span class="n">resultMap</span><span class="o">=</span><span class="ss">&quot;studentResult&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-55" name="__codelineno-11-55"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">select</span><span class="w"> </span><span class="n">Id</span><span class="p">,</span><span class="k">no</span><span class="p">,</span><span class="n">name</span><span class="p">,</span><span class="n">gender</span><span class="p">,</span><span class="n">age</span><span class="p">,</span><span class="n">dept</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">Student</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">Id</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-56" name="__codelineno-11-56"></a><span class="w">    </span><span class="o">&lt;</span><span class="n">foreach</span><span class="w"> </span><span class="n">item</span><span class="o">=</span><span class="ss">&quot;item&quot;</span><span class="w"> </span><span class="k">index</span><span class="o">=</span><span class="ss">&quot;index&quot;</span><span class="w"> </span><span class="n">collection</span><span class="o">=</span><span class="ss">&quot;list&quot;</span><span class="w"> </span><span class="k">open</span><span class="o">=</span><span class="ss">&quot;(&quot;</span><span class="w"> </span><span class="n">separator</span><span class="o">=</span><span class="ss">&quot;,&quot;</span><span class="w"> </span><span class="k">close</span><span class="o">=</span><span class="ss">&quot;)&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-57" name="__codelineno-11-57"></a><span class="w">      </span><span class="o">#</span><span class="err">{</span><span class="n">item</span><span class="err">}</span>
<a id="__codelineno-11-58" name="__codelineno-11-58"></a><span class="w">    </span><span class="o">&lt;/</span><span class="n">foreach</span><span class="o">&gt;</span>
<a id="__codelineno-11-59" name="__codelineno-11-59"></a><span class="w">    </span><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="k">desc</span>
<a id="__codelineno-11-60" name="__codelineno-11-60"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">select</span><span class="o">&gt;</span>
<a id="__codelineno-11-61" name="__codelineno-11-61"></a>
<a id="__codelineno-11-62" name="__codelineno-11-62"></a><span class="w">  </span><span class="o">&lt;!</span><span class="c1">-- Update according to id --&gt;</span>
<a id="__codelineno-11-63" name="__codelineno-11-63"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">update</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;update&quot;</span><span class="w"> </span><span class="n">parameterType</span><span class="o">=</span><span class="ss">&quot;xust.stu.demo.domain.Student&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-64" name="__codelineno-11-64"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">update</span><span class="w"> </span><span class="n">Student</span><span class="w"> </span><span class="k">set</span><span class="w"> </span><span class="k">no</span><span class="o">=#</span><span class="err">{</span><span class="k">no</span><span class="err">}</span><span class="p">,</span><span class="n">name</span><span class="o">=#</span><span class="err">{</span><span class="n">name</span><span class="err">}</span><span class="p">,</span><span class="n">gender</span><span class="o">=#</span><span class="err">{</span><span class="n">gender</span><span class="err">}</span><span class="p">,</span><span class="n">age</span><span class="o">=#</span><span class="err">{</span><span class="n">age</span><span class="err">}</span><span class="p">,</span><span class="n">dept</span><span class="o">=#</span><span class="err">{</span><span class="n">dept</span><span class="err">}</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">Id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">#</span><span class="err">{</span><span class="n">id</span><span class="err">}</span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-65" name="__codelineno-11-65"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">update</span><span class="o">&gt;</span>
<a id="__codelineno-11-66" name="__codelineno-11-66"></a>
<a id="__codelineno-11-67" name="__codelineno-11-67"></a><span class="w">  </span><span class="o">&lt;!</span><span class="c1">-- Delete --&gt;</span>
<a id="__codelineno-11-68" name="__codelineno-11-68"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">delete</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;deleteItems&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-69" name="__codelineno-11-69"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">delete</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">Student</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">Id</span><span class="w"> </span><span class="k">in</span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-70" name="__codelineno-11-70"></a><span class="w">    </span><span class="o">&lt;</span><span class="n">foreach</span><span class="w"> </span><span class="n">item</span><span class="o">=</span><span class="ss">&quot;item&quot;</span><span class="w"> </span><span class="k">index</span><span class="o">=</span><span class="ss">&quot;index&quot;</span><span class="w"> </span><span class="n">collection</span><span class="o">=</span><span class="ss">&quot;list&quot;</span><span class="w"> </span><span class="k">open</span><span class="o">=</span><span class="ss">&quot;(&quot;</span><span class="w"> </span><span class="n">separator</span><span class="o">=</span><span class="ss">&quot;,&quot;</span><span class="w"> </span><span class="k">close</span><span class="o">=</span><span class="ss">&quot;)&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-71" name="__codelineno-11-71"></a><span class="w">      </span><span class="o">#</span><span class="err">{</span><span class="n">item</span><span class="err">}</span>
<a id="__codelineno-11-72" name="__codelineno-11-72"></a><span class="w">    </span><span class="o">&lt;/</span><span class="n">foreach</span><span class="o">&gt;</span>
<a id="__codelineno-11-73" name="__codelineno-11-73"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">delete</span><span class="o">&gt;</span>
<a id="__codelineno-11-74" name="__codelineno-11-74"></a>
<a id="__codelineno-11-75" name="__codelineno-11-75"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">delete</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;deleteAll&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-76" name="__codelineno-11-76"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">delete</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">Student</span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-77" name="__codelineno-11-77"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">delete</span><span class="o">&gt;</span>
<a id="__codelineno-11-78" name="__codelineno-11-78"></a>
<a id="__codelineno-11-79" name="__codelineno-11-79"></a><span class="w">  </span><span class="o">&lt;</span><span class="k">delete</span><span class="w"> </span><span class="n">id</span><span class="o">=</span><span class="ss">&quot;delete&quot;</span><span class="o">&gt;</span>
<a id="__codelineno-11-80" name="__codelineno-11-80"></a><span class="w">    </span><span class="o">&lt;!</span><span class="p">[</span><span class="n">CDATA</span><span class="p">[</span><span class="k">delete</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">Student</span><span class="p">]]</span><span class="o">&gt;</span>
<a id="__codelineno-11-81" name="__codelineno-11-81"></a><span class="w">    </span><span class="o">&lt;</span><span class="k">where</span><span class="o">&gt;</span>
<a id="__codelineno-11-82" name="__codelineno-11-82"></a><span class="w">      </span><span class="o">&lt;</span><span class="k">if</span><span class="w"> </span><span class="n">test</span><span class="o">=</span><span class="ss">&quot;params.id != null&quot;</span><span class="o">&gt;</span><span class="k">and</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">#</span><span class="err">{</span><span class="n">params</span><span class="p">.</span><span class="n">id</span><span class="err">}</span><span class="o">&lt;/</span><span class="k">if</span><span class="o">&gt;</span>
<a id="__codelineno-11-83" name="__codelineno-11-83"></a><span class="w">      </span><span class="o">&lt;</span><span class="k">if</span><span class="w"> </span><span class="n">test</span><span class="o">=</span><span class="ss">&quot;params.id == null&quot;</span><span class="o">&gt;</span><span class="k">and</span><span class="w"> </span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;999999&#39;</span><span class="o">&lt;/</span><span class="k">if</span><span class="o">&gt;</span>
<a id="__codelineno-11-84" name="__codelineno-11-84"></a><span class="w">    </span><span class="o">&lt;/</span><span class="k">where</span><span class="o">&gt;</span>
<a id="__codelineno-11-85" name="__codelineno-11-85"></a><span class="w">  </span><span class="o">&lt;/</span><span class="k">delete</span><span class="o">&gt;</span>
<a id="__codelineno-11-86" name="__codelineno-11-86"></a>
<a id="__codelineno-11-87" name="__codelineno-11-87"></a><span class="o">&lt;/</span><span class="n">mapper</span><span class="o">&gt;</span>
</code></pre></div></td></tr></table></div>
</details>
</li>
<li>
<p>创建<code>StudentService</code>接口和<code>StudentServiceImpl</code>实现类，实现CRUD操作，如下所示：</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">StudentService</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-12-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-12-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-12-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-12-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-12-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-12-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-12-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-12-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-12-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-12-10">10</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-12-1" name="__codelineno-12-1"></a><span class="kd">public</span><span class="w"> </span><span class="kd">interface</span> <span class="nc">StudentService</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-12-2" name="__codelineno-12-2"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">create</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-12-3" name="__codelineno-12-3"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">deleteAll</span><span class="p">();</span>
<a id="__codelineno-12-4" name="__codelineno-12-4"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">delete</span><span class="p">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-12-5" name="__codelineno-12-5"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">deleteItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">items</span><span class="p">);</span>
<a id="__codelineno-12-6" name="__codelineno-12-6"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">update</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-12-7" name="__codelineno-12-7"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">size</span><span class="p">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-12-8" name="__codelineno-12-8"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="nf">getPage</span><span class="p">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">pageNum</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">pageSize</span><span class="p">);</span><span class="w">    </span>
<a id="__codelineno-12-9" name="__codelineno-12-9"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Boolean</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">export2XLS</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">worksheet_name</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">OutputStream</span><span class="w"> </span><span class="n">output</span><span class="p">);</span>
<a id="__codelineno-12-10" name="__codelineno-12-10"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>StudentService.java</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/java/xust/stu/demo/service/StudentService.java</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-13-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-13-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-13-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-13-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-13-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-13-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-13-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-13-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-13-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-13-10">10</a></span>
<span class="normal"><a href="#__codelineno-13-11">11</a></span>
<span class="normal"><a href="#__codelineno-13-12">12</a></span>
<span class="normal"><a href="#__codelineno-13-13">13</a></span>
<span class="normal"><a href="#__codelineno-13-14">14</a></span>
<span class="normal"><a href="#__codelineno-13-15">15</a></span>
<span class="normal"><a href="#__codelineno-13-16">16</a></span>
<span class="normal"><a href="#__codelineno-13-17">17</a></span>
<span class="normal"><a href="#__codelineno-13-18">18</a></span>
<span class="normal"><a href="#__codelineno-13-19">19</a></span>
<span class="normal"><a href="#__codelineno-13-20">20</a></span>
<span class="normal"><a href="#__codelineno-13-21">21</a></span>
<span class="normal"><a href="#__codelineno-13-22">22</a></span>
<span class="normal"><a href="#__codelineno-13-23">23</a></span>
<span class="normal"><a href="#__codelineno-13-24">24</a></span>
<span class="normal"><a href="#__codelineno-13-25">25</a></span>
<span class="normal"><a href="#__codelineno-13-26">26</a></span>
<span class="normal"><a href="#__codelineno-13-27">27</a></span>
<span class="normal"><a href="#__codelineno-13-28">28</a></span>
<span class="normal"><a href="#__codelineno-13-29">29</a></span>
<span class="normal"><a href="#__codelineno-13-30">30</a></span>
<span class="normal"><a href="#__codelineno-13-31">31</a></span>
<span class="normal"><a href="#__codelineno-13-32">32</a></span>
<span class="normal"><a href="#__codelineno-13-33">33</a></span>
<span class="normal"><a href="#__codelineno-13-34">34</a></span>
<span class="normal"><a href="#__codelineno-13-35">35</a></span>
<span class="normal"><a href="#__codelineno-13-36">36</a></span>
<span class="normal"><a href="#__codelineno-13-37">37</a></span>
<span class="normal"><a href="#__codelineno-13-38">38</a></span>
<span class="normal"><a href="#__codelineno-13-39">39</a></span>
<span class="normal"><a href="#__codelineno-13-40">40</a></span>
<span class="normal"><a href="#__codelineno-13-41">41</a></span>
<span class="normal"><a href="#__codelineno-13-42">42</a></span>
<span class="normal"><a href="#__codelineno-13-43">43</a></span>
<span class="normal"><a href="#__codelineno-13-44">44</a></span>
<span class="normal"><a href="#__codelineno-13-45">45</a></span>
<span class="normal"><a href="#__codelineno-13-46">46</a></span>
<span class="normal"><a href="#__codelineno-13-47">47</a></span>
<span class="normal"><a href="#__codelineno-13-48">48</a></span>
<span class="normal"><a href="#__codelineno-13-49">49</a></span>
<span class="normal"><a href="#__codelineno-13-50">50</a></span>
<span class="normal"><a href="#__codelineno-13-51">51</a></span>
<span class="normal"><a href="#__codelineno-13-52">52</a></span>
<span class="normal"><a href="#__codelineno-13-53">53</a></span>
<span class="normal"><a href="#__codelineno-13-54">54</a></span>
<span class="normal"><a href="#__codelineno-13-55">55</a></span>
<span class="normal"><a href="#__codelineno-13-56">56</a></span>
<span class="normal"><a href="#__codelineno-13-57">57</a></span>
<span class="normal"><a href="#__codelineno-13-58">58</a></span>
<span class="normal"><a href="#__codelineno-13-59">59</a></span>
<span class="normal"><a href="#__codelineno-13-60">60</a></span>
<span class="normal"><a href="#__codelineno-13-61">61</a></span>
<span class="normal"><a href="#__codelineno-13-62">62</a></span>
<span class="normal"><a href="#__codelineno-13-63">63</a></span>
<span class="normal"><a href="#__codelineno-13-64">64</a></span>
<span class="normal"><a href="#__codelineno-13-65">65</a></span>
<span class="normal"><a href="#__codelineno-13-66">66</a></span>
<span class="normal"><a href="#__codelineno-13-67">67</a></span>
<span class="normal"><a href="#__codelineno-13-68">68</a></span>
<span class="normal"><a href="#__codelineno-13-69">69</a></span>
<span class="normal"><a href="#__codelineno-13-70">70</a></span>
<span class="normal"><a href="#__codelineno-13-71">71</a></span>
<span class="normal"><a href="#__codelineno-13-72">72</a></span>
<span class="normal"><a href="#__codelineno-13-73">73</a></span>
<span class="normal"><a href="#__codelineno-13-74">74</a></span>
<span class="normal"><a href="#__codelineno-13-75">75</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-13-1" name="__codelineno-13-1"></a><span class="cm">/*</span>
<a id="__codelineno-13-2" name="__codelineno-13-2"></a><span class="cm"> * File name : StudentService.java 2023-04-20</span>
<a id="__codelineno-13-3" name="__codelineno-13-3"></a><span class="cm"> * @generated May 28, 2023, 9:37:49 AM</span>
<a id="__codelineno-13-4" name="__codelineno-13-4"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-13-5" name="__codelineno-13-5"></a><span class="cm"> * Copyright 2023 XUST. All rights reserved.</span>
<a id="__codelineno-13-6" name="__codelineno-13-6"></a><span class="cm"> */</span>
<a id="__codelineno-13-7" name="__codelineno-13-7"></a><span class="n">package</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="n">service</span><span class="p">;</span>
<a id="__codelineno-13-8" name="__codelineno-13-8"></a>
<a id="__codelineno-13-9" name="__codelineno-13-9"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">OutputStream</span><span class="p">;</span>
<a id="__codelineno-13-10" name="__codelineno-13-10"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="k">Map</span><span class="p">;</span>
<a id="__codelineno-13-11" name="__codelineno-13-11"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">List</span><span class="p">;</span>
<a id="__codelineno-13-12" name="__codelineno-13-12"></a>
<a id="__codelineno-13-13" name="__codelineno-13-13"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="k">Result</span><span class="p">;</span>
<a id="__codelineno-13-14" name="__codelineno-13-14"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">.</span><span class="n">Student</span><span class="p">;</span>
<a id="__codelineno-13-15" name="__codelineno-13-15"></a>
<a id="__codelineno-13-16" name="__codelineno-13-16"></a><span class="cm">/**</span>
<a id="__codelineno-13-17" name="__codelineno-13-17"></a><span class="cm"> * Interface StudentService</span>
<a id="__codelineno-13-18" name="__codelineno-13-18"></a><span class="cm"> * Student service interface.</span>
<a id="__codelineno-13-19" name="__codelineno-13-19"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-13-20" name="__codelineno-13-20"></a><span class="cm"> * @version 1.0, 2023-04-20</span>
<a id="__codelineno-13-21" name="__codelineno-13-21"></a><span class="cm"> */</span>
<a id="__codelineno-13-22" name="__codelineno-13-22"></a><span class="k">public</span><span class="w"> </span><span class="n">interface</span><span class="w"> </span><span class="n">StudentService</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-13-23" name="__codelineno-13-23"></a>
<a id="__codelineno-13-24" name="__codelineno-13-24"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-13-25" name="__codelineno-13-25"></a><span class="cm">   * 创建对象</span>
<a id="__codelineno-13-26" name="__codelineno-13-26"></a><span class="cm">   * @param newValue 新对象</span>
<a id="__codelineno-13-27" name="__codelineno-13-27"></a><span class="cm">   * @return 影响行数，1为成功，0为失败</span>
<a id="__codelineno-13-28" name="__codelineno-13-28"></a><span class="cm">   */</span>
<a id="__codelineno-13-29" name="__codelineno-13-29"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="k">create</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-13-30" name="__codelineno-13-30"></a>
<a id="__codelineno-13-31" name="__codelineno-13-31"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-13-32" name="__codelineno-13-32"></a><span class="cm">   * 删除所有数据</span>
<a id="__codelineno-13-33" name="__codelineno-13-33"></a><span class="cm">   * @return 删除行数</span>
<a id="__codelineno-13-34" name="__codelineno-13-34"></a><span class="cm">   */</span>
<a id="__codelineno-13-35" name="__codelineno-13-35"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteAll</span><span class="p">();</span>
<a id="__codelineno-13-36" name="__codelineno-13-36"></a>
<a id="__codelineno-13-37" name="__codelineno-13-37"></a><span class="w">  </span><span class="cm">/*</span>
<a id="__codelineno-13-38" name="__codelineno-13-38"></a><span class="cm">   * 删除指定条件筛选的数据</span>
<a id="__codelineno-13-39" name="__codelineno-13-39"></a><span class="cm">   * @return 删除行数</span>
<a id="__codelineno-13-40" name="__codelineno-13-40"></a><span class="cm">   */</span>
<a id="__codelineno-13-41" name="__codelineno-13-41"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="k">delete</span><span class="p">(</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-13-42" name="__codelineno-13-42"></a>
<a id="__codelineno-13-43" name="__codelineno-13-43"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-13-44" name="__codelineno-13-44"></a><span class="cm">   * 删除对象</span>
<a id="__codelineno-13-45" name="__codelineno-13-45"></a><span class="cm">   * @param ids id列表</span>
<a id="__codelineno-13-46" name="__codelineno-13-46"></a><span class="cm">   * @return 非空Integer对象</span>
<a id="__codelineno-13-47" name="__codelineno-13-47"></a><span class="cm">   */</span>
<a id="__codelineno-13-48" name="__codelineno-13-48"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">items</span><span class="p">);</span>
<a id="__codelineno-13-49" name="__codelineno-13-49"></a>
<a id="__codelineno-13-50" name="__codelineno-13-50"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-13-51" name="__codelineno-13-51"></a><span class="cm">   * 更新对象</span>
<a id="__codelineno-13-52" name="__codelineno-13-52"></a><span class="cm">   * @param newValue 新值</span>
<a id="__codelineno-13-53" name="__codelineno-13-53"></a><span class="cm">   * @return 非空Integer对象</span>
<a id="__codelineno-13-54" name="__codelineno-13-54"></a><span class="cm">   */</span>
<a id="__codelineno-13-55" name="__codelineno-13-55"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="k">update</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-13-56" name="__codelineno-13-56"></a>
<a id="__codelineno-13-57" name="__codelineno-13-57"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-13-58" name="__codelineno-13-58"></a><span class="cm">   * 获取对象数量</span>
<a id="__codelineno-13-59" name="__codelineno-13-59"></a><span class="cm">   * @param params 并参数</span>
<a id="__codelineno-13-60" name="__codelineno-13-60"></a><span class="cm">   * @return 非空新对象，非空Integer对象</span>
<a id="__codelineno-13-61" name="__codelineno-13-61"></a><span class="cm">   */</span>
<a id="__codelineno-13-62" name="__codelineno-13-62"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="k">size</span><span class="p">(</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-13-63" name="__codelineno-13-63"></a>
<a id="__codelineno-13-64" name="__codelineno-13-64"></a><span class="w">  </span><span class="cm">/**</span>
<a id="__codelineno-13-65" name="__codelineno-13-65"></a><span class="cm">   * 获取对象分页</span>
<a id="__codelineno-13-66" name="__codelineno-13-66"></a><span class="cm">   * @param params 并参数</span>
<a id="__codelineno-13-67" name="__codelineno-13-67"></a><span class="cm">   * @param pageNum 页码(从1开始),超出范围会返回边界页</span>
<a id="__codelineno-13-68" name="__codelineno-13-68"></a><span class="cm">   * @param pageSize 分页大小</span>
<a id="__codelineno-13-69" name="__codelineno-13-69"></a><span class="cm">   * @return 非空对象列表</span>
<a id="__codelineno-13-70" name="__codelineno-13-70"></a><span class="cm">   */</span>
<a id="__codelineno-13-71" name="__codelineno-13-71"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">getPage</span><span class="p">(</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">pageNum</span><span class="p">,</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">pageSize</span><span class="p">);</span>
<a id="__codelineno-13-72" name="__codelineno-13-72"></a>
<a id="__codelineno-13-73" name="__codelineno-13-73"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="w"> </span><span class="n">export2XLS</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="k">data</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">worksheet_name</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">OutputStream</span><span class="w"> </span><span class="k">output</span><span class="p">);</span>
<a id="__codelineno-13-74" name="__codelineno-13-74"></a>
<a id="__codelineno-13-75" name="__codelineno-13-75"></a><span class="err">}</span>
</code></pre></div></td></tr></table></div>
</details>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">StudentServiceImpl</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-14-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-14-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-14-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-14-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-14-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-14-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-14-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-14-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-14-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-14-10">10</a></span>
<span class="normal"><a href="#__codelineno-14-11">11</a></span>
<span class="normal"><a href="#__codelineno-14-12">12</a></span>
<span class="normal"><a href="#__codelineno-14-13">13</a></span>
<span class="normal"><a href="#__codelineno-14-14">14</a></span>
<span class="normal"><a href="#__codelineno-14-15">15</a></span>
<span class="normal"><a href="#__codelineno-14-16">16</a></span>
<span class="normal"><a href="#__codelineno-14-17">17</a></span>
<span class="normal"><a href="#__codelineno-14-18">18</a></span>
<span class="normal"><a href="#__codelineno-14-19">19</a></span>
<span class="normal"><a href="#__codelineno-14-20">20</a></span>
<span class="normal"><a href="#__codelineno-14-21">21</a></span>
<span class="normal"><a href="#__codelineno-14-22">22</a></span>
<span class="normal"><a href="#__codelineno-14-23">23</a></span>
<span class="normal"><a href="#__codelineno-14-24">24</a></span>
<span class="normal"><a href="#__codelineno-14-25">25</a></span>
<span class="normal"><a href="#__codelineno-14-26">26</a></span>
<span class="normal"><a href="#__codelineno-14-27">27</a></span>
<span class="normal"><a href="#__codelineno-14-28">28</a></span>
<span class="normal"><a href="#__codelineno-14-29">29</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-14-1" name="__codelineno-14-1"></a><span class="nd">@Service</span>
<a id="__codelineno-14-2" name="__codelineno-14-2"></a><span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">StudentServiceImpl</span><span class="w"> </span><span class="kd">implements</span><span class="w"> </span><span class="n">StudentService</span><span class="p">{</span>
<a id="__codelineno-14-3" name="__codelineno-14-3"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="kd">static</span><span class="w"> </span><span class="n">Logger</span><span class="w"> </span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LoggerFactory</span><span class="p">.</span><span class="na">getLogger</span><span class="p">(</span><span class="n">StudentServiceImpl</span><span class="p">.</span><span class="na">class</span><span class="p">);</span>
<a id="__codelineno-14-4" name="__codelineno-14-4"></a>
<a id="__codelineno-14-5" name="__codelineno-14-5"></a><span class="w">  </span><span class="nd">@Autowired</span>
<a id="__codelineno-14-6" name="__codelineno-14-6"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">StudentDao</span><span class="w"> </span><span class="n">studentDao</span><span class="p">;</span>
<a id="__codelineno-14-7" name="__codelineno-14-7"></a>
<a id="__codelineno-14-8" name="__codelineno-14-8"></a><span class="w">  </span><span class="nd">@Override</span>
<a id="__codelineno-14-9" name="__codelineno-14-9"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">create</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-14-10" name="__codelineno-14-10"></a><span class="w">    </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-14-11" name="__codelineno-14-11"></a>
<a id="__codelineno-14-12" name="__codelineno-14-12"></a><span class="w">    </span><span class="k">try</span><span class="p">{</span>
<a id="__codelineno-14-13" name="__codelineno-14-13"></a><span class="w">      </span><span class="c1">//newValue.setSys_create_date(new Date());</span>
<a id="__codelineno-14-14" name="__codelineno-14-14"></a><span class="w">      </span><span class="n">newValue</span><span class="p">.</span><span class="na">setId</span><span class="p">(</span><span class="n">UUID</span><span class="p">.</span><span class="na">randomUUID</span><span class="p">().</span><span class="na">toString</span><span class="p">());</span>
<a id="__codelineno-14-15" name="__codelineno-14-15"></a><span class="w">      </span><span class="kt">int</span><span class="w"> </span><span class="n">effected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentDao</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-14-16" name="__codelineno-14-16"></a><span class="w">      </span><span class="k">if</span><span class="p">(</span><span class="n">effected</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">){</span>
<a id="__codelineno-14-17" name="__codelineno-14-17"></a><span class="w">        </span><span class="n">oc</span><span class="p">.</span><span class="na">setData</span><span class="p">(</span><span class="n">effected</span><span class="p">);</span>
<a id="__codelineno-14-18" name="__codelineno-14-18"></a><span class="w">      </span><span class="p">}</span><span class="k">else</span><span class="p">{</span>
<a id="__codelineno-14-19" name="__codelineno-14-19"></a><span class="w">        </span><span class="n">oc</span><span class="p">.</span><span class="na">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="na">DB_CREATE_FAIL</span><span class="p">);</span>
<a id="__codelineno-14-20" name="__codelineno-14-20"></a><span class="w">      </span><span class="p">}</span>
<a id="__codelineno-14-21" name="__codelineno-14-21"></a><span class="w">    </span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">){</span>
<a id="__codelineno-14-22" name="__codelineno-14-22"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="na">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="na">DB_CREATE_FAIL</span><span class="p">);</span>
<a id="__codelineno-14-23" name="__codelineno-14-23"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="na">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="na">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-14-24" name="__codelineno-14-24"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="na">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="na">getMessage</span><span class="p">());</span>
<a id="__codelineno-14-25" name="__codelineno-14-25"></a><span class="w">    </span><span class="p">}</span>
<a id="__codelineno-14-26" name="__codelineno-14-26"></a>
<a id="__codelineno-14-27" name="__codelineno-14-27"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-14-28" name="__codelineno-14-28"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-14-29" name="__codelineno-14-29"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>StudentServiceImpl.java</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/java/xust/stu/demo/service/StudentServiceImpl.java</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-15-1">  1</a></span>
<span class="normal"><a href="#__codelineno-15-2">  2</a></span>
<span class="normal"><a href="#__codelineno-15-3">  3</a></span>
<span class="normal"><a href="#__codelineno-15-4">  4</a></span>
<span class="normal"><a href="#__codelineno-15-5">  5</a></span>
<span class="normal"><a href="#__codelineno-15-6">  6</a></span>
<span class="normal"><a href="#__codelineno-15-7">  7</a></span>
<span class="normal"><a href="#__codelineno-15-8">  8</a></span>
<span class="normal"><a href="#__codelineno-15-9">  9</a></span>
<span class="normal"><a href="#__codelineno-15-10"> 10</a></span>
<span class="normal"><a href="#__codelineno-15-11"> 11</a></span>
<span class="normal"><a href="#__codelineno-15-12"> 12</a></span>
<span class="normal"><a href="#__codelineno-15-13"> 13</a></span>
<span class="normal"><a href="#__codelineno-15-14"> 14</a></span>
<span class="normal"><a href="#__codelineno-15-15"> 15</a></span>
<span class="normal"><a href="#__codelineno-15-16"> 16</a></span>
<span class="normal"><a href="#__codelineno-15-17"> 17</a></span>
<span class="normal"><a href="#__codelineno-15-18"> 18</a></span>
<span class="normal"><a href="#__codelineno-15-19"> 19</a></span>
<span class="normal"><a href="#__codelineno-15-20"> 20</a></span>
<span class="normal"><a href="#__codelineno-15-21"> 21</a></span>
<span class="normal"><a href="#__codelineno-15-22"> 22</a></span>
<span class="normal"><a href="#__codelineno-15-23"> 23</a></span>
<span class="normal"><a href="#__codelineno-15-24"> 24</a></span>
<span class="normal"><a href="#__codelineno-15-25"> 25</a></span>
<span class="normal"><a href="#__codelineno-15-26"> 26</a></span>
<span class="normal"><a href="#__codelineno-15-27"> 27</a></span>
<span class="normal"><a href="#__codelineno-15-28"> 28</a></span>
<span class="normal"><a href="#__codelineno-15-29"> 29</a></span>
<span class="normal"><a href="#__codelineno-15-30"> 30</a></span>
<span class="normal"><a href="#__codelineno-15-31"> 31</a></span>
<span class="normal"><a href="#__codelineno-15-32"> 32</a></span>
<span class="normal"><a href="#__codelineno-15-33"> 33</a></span>
<span class="normal"><a href="#__codelineno-15-34"> 34</a></span>
<span class="normal"><a href="#__codelineno-15-35"> 35</a></span>
<span class="normal"><a href="#__codelineno-15-36"> 36</a></span>
<span class="normal"><a href="#__codelineno-15-37"> 37</a></span>
<span class="normal"><a href="#__codelineno-15-38"> 38</a></span>
<span class="normal"><a href="#__codelineno-15-39"> 39</a></span>
<span class="normal"><a href="#__codelineno-15-40"> 40</a></span>
<span class="normal"><a href="#__codelineno-15-41"> 41</a></span>
<span class="normal"><a href="#__codelineno-15-42"> 42</a></span>
<span class="normal"><a href="#__codelineno-15-43"> 43</a></span>
<span class="normal"><a href="#__codelineno-15-44"> 44</a></span>
<span class="normal"><a href="#__codelineno-15-45"> 45</a></span>
<span class="normal"><a href="#__codelineno-15-46"> 46</a></span>
<span class="normal"><a href="#__codelineno-15-47"> 47</a></span>
<span class="normal"><a href="#__codelineno-15-48"> 48</a></span>
<span class="normal"><a href="#__codelineno-15-49"> 49</a></span>
<span class="normal"><a href="#__codelineno-15-50"> 50</a></span>
<span class="normal"><a href="#__codelineno-15-51"> 51</a></span>
<span class="normal"><a href="#__codelineno-15-52"> 52</a></span>
<span class="normal"><a href="#__codelineno-15-53"> 53</a></span>
<span class="normal"><a href="#__codelineno-15-54"> 54</a></span>
<span class="normal"><a href="#__codelineno-15-55"> 55</a></span>
<span class="normal"><a href="#__codelineno-15-56"> 56</a></span>
<span class="normal"><a href="#__codelineno-15-57"> 57</a></span>
<span class="normal"><a href="#__codelineno-15-58"> 58</a></span>
<span class="normal"><a href="#__codelineno-15-59"> 59</a></span>
<span class="normal"><a href="#__codelineno-15-60"> 60</a></span>
<span class="normal"><a href="#__codelineno-15-61"> 61</a></span>
<span class="normal"><a href="#__codelineno-15-62"> 62</a></span>
<span class="normal"><a href="#__codelineno-15-63"> 63</a></span>
<span class="normal"><a href="#__codelineno-15-64"> 64</a></span>
<span class="normal"><a href="#__codelineno-15-65"> 65</a></span>
<span class="normal"><a href="#__codelineno-15-66"> 66</a></span>
<span class="normal"><a href="#__codelineno-15-67"> 67</a></span>
<span class="normal"><a href="#__codelineno-15-68"> 68</a></span>
<span class="normal"><a href="#__codelineno-15-69"> 69</a></span>
<span class="normal"><a href="#__codelineno-15-70"> 70</a></span>
<span class="normal"><a href="#__codelineno-15-71"> 71</a></span>
<span class="normal"><a href="#__codelineno-15-72"> 72</a></span>
<span class="normal"><a href="#__codelineno-15-73"> 73</a></span>
<span class="normal"><a href="#__codelineno-15-74"> 74</a></span>
<span class="normal"><a href="#__codelineno-15-75"> 75</a></span>
<span class="normal"><a href="#__codelineno-15-76"> 76</a></span>
<span class="normal"><a href="#__codelineno-15-77"> 77</a></span>
<span class="normal"><a href="#__codelineno-15-78"> 78</a></span>
<span class="normal"><a href="#__codelineno-15-79"> 79</a></span>
<span class="normal"><a href="#__codelineno-15-80"> 80</a></span>
<span class="normal"><a href="#__codelineno-15-81"> 81</a></span>
<span class="normal"><a href="#__codelineno-15-82"> 82</a></span>
<span class="normal"><a href="#__codelineno-15-83"> 83</a></span>
<span class="normal"><a href="#__codelineno-15-84"> 84</a></span>
<span class="normal"><a href="#__codelineno-15-85"> 85</a></span>
<span class="normal"><a href="#__codelineno-15-86"> 86</a></span>
<span class="normal"><a href="#__codelineno-15-87"> 87</a></span>
<span class="normal"><a href="#__codelineno-15-88"> 88</a></span>
<span class="normal"><a href="#__codelineno-15-89"> 89</a></span>
<span class="normal"><a href="#__codelineno-15-90"> 90</a></span>
<span class="normal"><a href="#__codelineno-15-91"> 91</a></span>
<span class="normal"><a href="#__codelineno-15-92"> 92</a></span>
<span class="normal"><a href="#__codelineno-15-93"> 93</a></span>
<span class="normal"><a href="#__codelineno-15-94"> 94</a></span>
<span class="normal"><a href="#__codelineno-15-95"> 95</a></span>
<span class="normal"><a href="#__codelineno-15-96"> 96</a></span>
<span class="normal"><a href="#__codelineno-15-97"> 97</a></span>
<span class="normal"><a href="#__codelineno-15-98"> 98</a></span>
<span class="normal"><a href="#__codelineno-15-99"> 99</a></span>
<span class="normal"><a href="#__codelineno-15-100">100</a></span>
<span class="normal"><a href="#__codelineno-15-101">101</a></span>
<span class="normal"><a href="#__codelineno-15-102">102</a></span>
<span class="normal"><a href="#__codelineno-15-103">103</a></span>
<span class="normal"><a href="#__codelineno-15-104">104</a></span>
<span class="normal"><a href="#__codelineno-15-105">105</a></span>
<span class="normal"><a href="#__codelineno-15-106">106</a></span>
<span class="normal"><a href="#__codelineno-15-107">107</a></span>
<span class="normal"><a href="#__codelineno-15-108">108</a></span>
<span class="normal"><a href="#__codelineno-15-109">109</a></span>
<span class="normal"><a href="#__codelineno-15-110">110</a></span>
<span class="normal"><a href="#__codelineno-15-111">111</a></span>
<span class="normal"><a href="#__codelineno-15-112">112</a></span>
<span class="normal"><a href="#__codelineno-15-113">113</a></span>
<span class="normal"><a href="#__codelineno-15-114">114</a></span>
<span class="normal"><a href="#__codelineno-15-115">115</a></span>
<span class="normal"><a href="#__codelineno-15-116">116</a></span>
<span class="normal"><a href="#__codelineno-15-117">117</a></span>
<span class="normal"><a href="#__codelineno-15-118">118</a></span>
<span class="normal"><a href="#__codelineno-15-119">119</a></span>
<span class="normal"><a href="#__codelineno-15-120">120</a></span>
<span class="normal"><a href="#__codelineno-15-121">121</a></span>
<span class="normal"><a href="#__codelineno-15-122">122</a></span>
<span class="normal"><a href="#__codelineno-15-123">123</a></span>
<span class="normal"><a href="#__codelineno-15-124">124</a></span>
<span class="normal"><a href="#__codelineno-15-125">125</a></span>
<span class="normal"><a href="#__codelineno-15-126">126</a></span>
<span class="normal"><a href="#__codelineno-15-127">127</a></span>
<span class="normal"><a href="#__codelineno-15-128">128</a></span>
<span class="normal"><a href="#__codelineno-15-129">129</a></span>
<span class="normal"><a href="#__codelineno-15-130">130</a></span>
<span class="normal"><a href="#__codelineno-15-131">131</a></span>
<span class="normal"><a href="#__codelineno-15-132">132</a></span>
<span class="normal"><a href="#__codelineno-15-133">133</a></span>
<span class="normal"><a href="#__codelineno-15-134">134</a></span>
<span class="normal"><a href="#__codelineno-15-135">135</a></span>
<span class="normal"><a href="#__codelineno-15-136">136</a></span>
<span class="normal"><a href="#__codelineno-15-137">137</a></span>
<span class="normal"><a href="#__codelineno-15-138">138</a></span>
<span class="normal"><a href="#__codelineno-15-139">139</a></span>
<span class="normal"><a href="#__codelineno-15-140">140</a></span>
<span class="normal"><a href="#__codelineno-15-141">141</a></span>
<span class="normal"><a href="#__codelineno-15-142">142</a></span>
<span class="normal"><a href="#__codelineno-15-143">143</a></span>
<span class="normal"><a href="#__codelineno-15-144">144</a></span>
<span class="normal"><a href="#__codelineno-15-145">145</a></span>
<span class="normal"><a href="#__codelineno-15-146">146</a></span>
<span class="normal"><a href="#__codelineno-15-147">147</a></span>
<span class="normal"><a href="#__codelineno-15-148">148</a></span>
<span class="normal"><a href="#__codelineno-15-149">149</a></span>
<span class="normal"><a href="#__codelineno-15-150">150</a></span>
<span class="normal"><a href="#__codelineno-15-151">151</a></span>
<span class="normal"><a href="#__codelineno-15-152">152</a></span>
<span class="normal"><a href="#__codelineno-15-153">153</a></span>
<span class="normal"><a href="#__codelineno-15-154">154</a></span>
<span class="normal"><a href="#__codelineno-15-155">155</a></span>
<span class="normal"><a href="#__codelineno-15-156">156</a></span>
<span class="normal"><a href="#__codelineno-15-157">157</a></span>
<span class="normal"><a href="#__codelineno-15-158">158</a></span>
<span class="normal"><a href="#__codelineno-15-159">159</a></span>
<span class="normal"><a href="#__codelineno-15-160">160</a></span>
<span class="normal"><a href="#__codelineno-15-161">161</a></span>
<span class="normal"><a href="#__codelineno-15-162">162</a></span>
<span class="normal"><a href="#__codelineno-15-163">163</a></span>
<span class="normal"><a href="#__codelineno-15-164">164</a></span>
<span class="normal"><a href="#__codelineno-15-165">165</a></span>
<span class="normal"><a href="#__codelineno-15-166">166</a></span>
<span class="normal"><a href="#__codelineno-15-167">167</a></span>
<span class="normal"><a href="#__codelineno-15-168">168</a></span>
<span class="normal"><a href="#__codelineno-15-169">169</a></span>
<span class="normal"><a href="#__codelineno-15-170">170</a></span>
<span class="normal"><a href="#__codelineno-15-171">171</a></span>
<span class="normal"><a href="#__codelineno-15-172">172</a></span>
<span class="normal"><a href="#__codelineno-15-173">173</a></span>
<span class="normal"><a href="#__codelineno-15-174">174</a></span>
<span class="normal"><a href="#__codelineno-15-175">175</a></span>
<span class="normal"><a href="#__codelineno-15-176">176</a></span>
<span class="normal"><a href="#__codelineno-15-177">177</a></span>
<span class="normal"><a href="#__codelineno-15-178">178</a></span>
<span class="normal"><a href="#__codelineno-15-179">179</a></span>
<span class="normal"><a href="#__codelineno-15-180">180</a></span>
<span class="normal"><a href="#__codelineno-15-181">181</a></span>
<span class="normal"><a href="#__codelineno-15-182">182</a></span>
<span class="normal"><a href="#__codelineno-15-183">183</a></span>
<span class="normal"><a href="#__codelineno-15-184">184</a></span>
<span class="normal"><a href="#__codelineno-15-185">185</a></span>
<span class="normal"><a href="#__codelineno-15-186">186</a></span>
<span class="normal"><a href="#__codelineno-15-187">187</a></span>
<span class="normal"><a href="#__codelineno-15-188">188</a></span>
<span class="normal"><a href="#__codelineno-15-189">189</a></span>
<span class="normal"><a href="#__codelineno-15-190">190</a></span>
<span class="normal"><a href="#__codelineno-15-191">191</a></span>
<span class="normal"><a href="#__codelineno-15-192">192</a></span>
<span class="normal"><a href="#__codelineno-15-193">193</a></span>
<span class="normal"><a href="#__codelineno-15-194">194</a></span>
<span class="normal"><a href="#__codelineno-15-195">195</a></span>
<span class="normal"><a href="#__codelineno-15-196">196</a></span>
<span class="normal"><a href="#__codelineno-15-197">197</a></span>
<span class="normal"><a href="#__codelineno-15-198">198</a></span>
<span class="normal"><a href="#__codelineno-15-199">199</a></span>
<span class="normal"><a href="#__codelineno-15-200">200</a></span>
<span class="normal"><a href="#__codelineno-15-201">201</a></span>
<span class="normal"><a href="#__codelineno-15-202">202</a></span>
<span class="normal"><a href="#__codelineno-15-203">203</a></span>
<span class="normal"><a href="#__codelineno-15-204">204</a></span>
<span class="normal"><a href="#__codelineno-15-205">205</a></span>
<span class="normal"><a href="#__codelineno-15-206">206</a></span>
<span class="normal"><a href="#__codelineno-15-207">207</a></span>
<span class="normal"><a href="#__codelineno-15-208">208</a></span>
<span class="normal"><a href="#__codelineno-15-209">209</a></span>
<span class="normal"><a href="#__codelineno-15-210">210</a></span>
<span class="normal"><a href="#__codelineno-15-211">211</a></span>
<span class="normal"><a href="#__codelineno-15-212">212</a></span>
<span class="normal"><a href="#__codelineno-15-213">213</a></span>
<span class="normal"><a href="#__codelineno-15-214">214</a></span>
<span class="normal"><a href="#__codelineno-15-215">215</a></span>
<span class="normal"><a href="#__codelineno-15-216">216</a></span>
<span class="normal"><a href="#__codelineno-15-217">217</a></span>
<span class="normal"><a href="#__codelineno-15-218">218</a></span>
<span class="normal"><a href="#__codelineno-15-219">219</a></span>
<span class="normal"><a href="#__codelineno-15-220">220</a></span>
<span class="normal"><a href="#__codelineno-15-221">221</a></span>
<span class="normal"><a href="#__codelineno-15-222">222</a></span>
<span class="normal"><a href="#__codelineno-15-223">223</a></span>
<span class="normal"><a href="#__codelineno-15-224">224</a></span>
<span class="normal"><a href="#__codelineno-15-225">225</a></span>
<span class="normal"><a href="#__codelineno-15-226">226</a></span>
<span class="normal"><a href="#__codelineno-15-227">227</a></span>
<span class="normal"><a href="#__codelineno-15-228">228</a></span>
<span class="normal"><a href="#__codelineno-15-229">229</a></span>
<span class="normal"><a href="#__codelineno-15-230">230</a></span>
<span class="normal"><a href="#__codelineno-15-231">231</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1"></a><span class="n">package</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="n">service</span><span class="p">;</span>
<a id="__codelineno-15-2" name="__codelineno-15-2"></a>
<a id="__codelineno-15-3" name="__codelineno-15-3"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">OutputStream</span><span class="p">;</span>
<a id="__codelineno-15-4" name="__codelineno-15-4"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">ArrayList</span><span class="p">;</span>
<a id="__codelineno-15-5" name="__codelineno-15-5"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">List</span><span class="p">;</span>
<a id="__codelineno-15-6" name="__codelineno-15-6"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="k">Map</span><span class="p">;</span>
<a id="__codelineno-15-7" name="__codelineno-15-7"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">UUID</span><span class="p">;</span>
<a id="__codelineno-15-8" name="__codelineno-15-8"></a>
<a id="__codelineno-15-9" name="__codelineno-15-9"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">slf4j</span><span class="p">.</span><span class="n">Logger</span><span class="p">;</span>
<a id="__codelineno-15-10" name="__codelineno-15-10"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">slf4j</span><span class="p">.</span><span class="n">LoggerFactory</span><span class="p">;</span>
<a id="__codelineno-15-11" name="__codelineno-15-11"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">poi</span><span class="p">.</span><span class="n">hssf</span><span class="p">.</span><span class="n">usermodel</span><span class="p">.</span><span class="n">HSSFCell</span><span class="p">;</span>
<a id="__codelineno-15-12" name="__codelineno-15-12"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">poi</span><span class="p">.</span><span class="n">hssf</span><span class="p">.</span><span class="n">usermodel</span><span class="p">.</span><span class="n">HSSFRow</span><span class="p">;</span>
<a id="__codelineno-15-13" name="__codelineno-15-13"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">poi</span><span class="p">.</span><span class="n">hssf</span><span class="p">.</span><span class="n">usermodel</span><span class="p">.</span><span class="n">HSSFSheet</span><span class="p">;</span>
<a id="__codelineno-15-14" name="__codelineno-15-14"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">poi</span><span class="p">.</span><span class="n">hssf</span><span class="p">.</span><span class="n">usermodel</span><span class="p">.</span><span class="n">HSSFWorkbook</span><span class="p">;</span>
<a id="__codelineno-15-15" name="__codelineno-15-15"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">poi</span><span class="p">.</span><span class="n">ss</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">CellRangeAddress</span><span class="p">;</span>
<a id="__codelineno-15-16" name="__codelineno-15-16"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">beans</span><span class="p">.</span><span class="n">factory</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">Autowired</span><span class="p">;</span>
<a id="__codelineno-15-17" name="__codelineno-15-17"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">stereotype</span><span class="p">.</span><span class="n">Service</span><span class="p">;</span>
<a id="__codelineno-15-18" name="__codelineno-15-18"></a>
<a id="__codelineno-15-19" name="__codelineno-15-19"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="k">Result</span><span class="p">;</span>
<a id="__codelineno-15-20" name="__codelineno-15-20"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">ErrEnum</span><span class="p">;</span>
<a id="__codelineno-15-21" name="__codelineno-15-21"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="n">dao</span><span class="p">.</span><span class="n">StudentDao</span><span class="p">;</span>
<a id="__codelineno-15-22" name="__codelineno-15-22"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">.</span><span class="n">Student</span><span class="p">;</span>
<a id="__codelineno-15-23" name="__codelineno-15-23"></a>
<a id="__codelineno-15-24" name="__codelineno-15-24"></a><span class="cm">/**</span>
<a id="__codelineno-15-25" name="__codelineno-15-25"></a><span class="cm"> * Class StudentServiceImpl</span>
<a id="__codelineno-15-26" name="__codelineno-15-26"></a><span class="cm"> * StudentService interface implementation.</span>
<a id="__codelineno-15-27" name="__codelineno-15-27"></a><span class="cm"> * @generated May 28, 2023, 9:37:49 AM</span>
<a id="__codelineno-15-28" name="__codelineno-15-28"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-15-29" name="__codelineno-15-29"></a><span class="cm"> * @version 1.0, 2023-04-20</span>
<a id="__codelineno-15-30" name="__codelineno-15-30"></a><span class="cm"> */</span>
<a id="__codelineno-15-31" name="__codelineno-15-31"></a><span class="o">@</span><span class="n">Service</span>
<a id="__codelineno-15-32" name="__codelineno-15-32"></a><span class="k">public</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="n">StudentServiceImpl</span><span class="w"> </span><span class="n">implements</span><span class="w"> </span><span class="n">StudentService</span><span class="err">{</span>
<a id="__codelineno-15-33" name="__codelineno-15-33"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="k">final</span><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">Logger</span><span class="w"> </span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LoggerFactory</span><span class="p">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">StudentServiceImpl</span><span class="p">.</span><span class="k">class</span><span class="p">);</span>
<a id="__codelineno-15-34" name="__codelineno-15-34"></a>
<a id="__codelineno-15-35" name="__codelineno-15-35"></a><span class="w">  </span><span class="o">@</span><span class="n">Autowired</span>
<a id="__codelineno-15-36" name="__codelineno-15-36"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">StudentDao</span><span class="w"> </span><span class="n">studentDao</span><span class="p">;</span>
<a id="__codelineno-15-37" name="__codelineno-15-37"></a>
<a id="__codelineno-15-38" name="__codelineno-15-38"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-39" name="__codelineno-15-39"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="k">create</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-40" name="__codelineno-15-40"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-41" name="__codelineno-15-41"></a>
<a id="__codelineno-15-42" name="__codelineno-15-42"></a><span class="w">    </span><span class="n">try</span><span class="err">{</span>
<a id="__codelineno-15-43" name="__codelineno-15-43"></a><span class="w">      </span><span class="o">//</span><span class="n">newValue</span><span class="p">.</span><span class="n">setSys_create_date</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="nb">Date</span><span class="p">());</span>
<a id="__codelineno-15-44" name="__codelineno-15-44"></a><span class="w">      </span><span class="n">newValue</span><span class="p">.</span><span class="n">setId</span><span class="p">(</span><span class="n">UUID</span><span class="p">.</span><span class="n">randomUUID</span><span class="p">().</span><span class="n">toString</span><span class="p">());</span>
<a id="__codelineno-15-45" name="__codelineno-15-45"></a><span class="w">      </span><span class="nb">int</span><span class="w"> </span><span class="n">effected</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentDao</span><span class="p">.</span><span class="k">create</span><span class="p">(</span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-15-46" name="__codelineno-15-46"></a><span class="w">      </span><span class="k">if</span><span class="p">(</span><span class="n">effected</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-15-47" name="__codelineno-15-47"></a><span class="w">        </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">newValue</span><span class="p">);</span>
<a id="__codelineno-15-48" name="__codelineno-15-48"></a><span class="w">      </span><span class="err">}</span><span class="k">else</span><span class="err">{</span>
<a id="__codelineno-15-49" name="__codelineno-15-49"></a><span class="w">        </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_CREATE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-50" name="__codelineno-15-50"></a><span class="w">      </span><span class="err">}</span>
<a id="__codelineno-15-51" name="__codelineno-15-51"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-15-52" name="__codelineno-15-52"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_CREATE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-53" name="__codelineno-15-53"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-54" name="__codelineno-15-54"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-55" name="__codelineno-15-55"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-56" name="__codelineno-15-56"></a>
<a id="__codelineno-15-57" name="__codelineno-15-57"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-58" name="__codelineno-15-58"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-59" name="__codelineno-15-59"></a>
<a id="__codelineno-15-60" name="__codelineno-15-60"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-61" name="__codelineno-15-61"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteAll</span><span class="p">()</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-62" name="__codelineno-15-62"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-63" name="__codelineno-15-63"></a>
<a id="__codelineno-15-64" name="__codelineno-15-64"></a><span class="w">    </span><span class="n">try</span><span class="err">{</span>
<a id="__codelineno-15-65" name="__codelineno-15-65"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">studentDao</span><span class="p">.</span><span class="n">deleteAll</span><span class="p">());</span>
<a id="__codelineno-15-66" name="__codelineno-15-66"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-15-67" name="__codelineno-15-67"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_DELETE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-68" name="__codelineno-15-68"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-69" name="__codelineno-15-69"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-70" name="__codelineno-15-70"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-71" name="__codelineno-15-71"></a>
<a id="__codelineno-15-72" name="__codelineno-15-72"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-73" name="__codelineno-15-73"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-74" name="__codelineno-15-74"></a>
<a id="__codelineno-15-75" name="__codelineno-15-75"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-76" name="__codelineno-15-76"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteItems</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">items</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-77" name="__codelineno-15-77"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-78" name="__codelineno-15-78"></a>
<a id="__codelineno-15-79" name="__codelineno-15-79"></a><span class="w">    </span><span class="n">try</span><span class="err">{</span>
<a id="__codelineno-15-80" name="__codelineno-15-80"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">studentDao</span><span class="p">.</span><span class="n">deleteItems</span><span class="p">(</span><span class="n">items</span><span class="p">));</span>
<a id="__codelineno-15-81" name="__codelineno-15-81"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-15-82" name="__codelineno-15-82"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_DELETE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-83" name="__codelineno-15-83"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-84" name="__codelineno-15-84"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-85" name="__codelineno-15-85"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-86" name="__codelineno-15-86"></a>
<a id="__codelineno-15-87" name="__codelineno-15-87"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-88" name="__codelineno-15-88"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-89" name="__codelineno-15-89"></a>
<a id="__codelineno-15-90" name="__codelineno-15-90"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-91" name="__codelineno-15-91"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="k">delete</span><span class="p">(</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-92" name="__codelineno-15-92"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-93" name="__codelineno-15-93"></a>
<a id="__codelineno-15-94" name="__codelineno-15-94"></a><span class="w">    </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-95" name="__codelineno-15-95"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">studentDao</span><span class="p">.</span><span class="k">delete</span><span class="p">(</span><span class="n">params</span><span class="p">));</span>
<a id="__codelineno-15-96" name="__codelineno-15-96"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-97" name="__codelineno-15-97"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_DELETE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-98" name="__codelineno-15-98"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-99" name="__codelineno-15-99"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-100" name="__codelineno-15-100"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-101" name="__codelineno-15-101"></a>
<a id="__codelineno-15-102" name="__codelineno-15-102"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-103" name="__codelineno-15-103"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-104" name="__codelineno-15-104"></a>
<a id="__codelineno-15-105" name="__codelineno-15-105"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-106" name="__codelineno-15-106"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="k">update</span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">newValue</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-107" name="__codelineno-15-107"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-108" name="__codelineno-15-108"></a><span class="w">    </span><span class="n">try</span><span class="err">{</span>
<a id="__codelineno-15-109" name="__codelineno-15-109"></a><span class="w">      </span><span class="o">//</span><span class="n">newValue</span><span class="p">.</span><span class="n">setSys_last_update_date</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="nb">Date</span><span class="p">());</span>
<a id="__codelineno-15-110" name="__codelineno-15-110"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">studentDao</span><span class="p">.</span><span class="k">update</span><span class="p">(</span><span class="n">newValue</span><span class="p">));</span>
<a id="__codelineno-15-111" name="__codelineno-15-111"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-15-112" name="__codelineno-15-112"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_UPDATE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-113" name="__codelineno-15-113"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-114" name="__codelineno-15-114"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-115" name="__codelineno-15-115"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-116" name="__codelineno-15-116"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-117" name="__codelineno-15-117"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-118" name="__codelineno-15-118"></a>
<a id="__codelineno-15-119" name="__codelineno-15-119"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-120" name="__codelineno-15-120"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="k">size</span><span class="p">(</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-121" name="__codelineno-15-121"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-122" name="__codelineno-15-122"></a>
<a id="__codelineno-15-123" name="__codelineno-15-123"></a><span class="w">    </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-124" name="__codelineno-15-124"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">studentDao</span><span class="p">.</span><span class="k">size</span><span class="p">(</span><span class="n">params</span><span class="p">));</span>
<a id="__codelineno-15-125" name="__codelineno-15-125"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-126" name="__codelineno-15-126"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_SIZE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-127" name="__codelineno-15-127"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-128" name="__codelineno-15-128"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-129" name="__codelineno-15-129"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-130" name="__codelineno-15-130"></a>
<a id="__codelineno-15-131" name="__codelineno-15-131"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-132" name="__codelineno-15-132"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-133" name="__codelineno-15-133"></a>
<a id="__codelineno-15-134" name="__codelineno-15-134"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-135" name="__codelineno-15-135"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">getPage</span><span class="p">(</span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">pageNum</span><span class="p">,</span><span class="w"> </span><span class="nb">int</span><span class="w"> </span><span class="n">pageSize</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-136" name="__codelineno-15-136"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="p">();</span>
<a id="__codelineno-15-137" name="__codelineno-15-137"></a><span class="w">    </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="p">());</span>
<a id="__codelineno-15-138" name="__codelineno-15-138"></a>
<a id="__codelineno-15-139" name="__codelineno-15-139"></a><span class="w">    </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-140" name="__codelineno-15-140"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">studentDao</span><span class="p">.</span><span class="n">getPage</span><span class="p">(</span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="n">pageNum</span><span class="p">,</span><span class="w"> </span><span class="n">pageSize</span><span class="p">));</span>
<a id="__codelineno-15-141" name="__codelineno-15-141"></a><span class="w">    </span><span class="err">}</span><span class="n">catch</span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-142" name="__codelineno-15-142"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">DB_PAGE_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-143" name="__codelineno-15-143"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-144" name="__codelineno-15-144"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-145" name="__codelineno-15-145"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-146" name="__codelineno-15-146"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-147" name="__codelineno-15-147"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-148" name="__codelineno-15-148"></a>
<a id="__codelineno-15-149" name="__codelineno-15-149"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="w"> </span><span class="n">buildXLSTemplate</span><span class="p">(</span><span class="n">String</span><span class="w"> </span><span class="n">worksheet_name</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">OutputStream</span><span class="w"> </span><span class="k">output</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-150" name="__codelineno-15-150"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-151" name="__codelineno-15-151"></a>
<a id="__codelineno-15-152" name="__codelineno-15-152"></a><span class="w">    </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-153" name="__codelineno-15-153"></a><span class="w">      </span><span class="n">HSSFWorkbook</span><span class="w"> </span><span class="n">wb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HSSFWorkbook</span><span class="p">();</span>
<a id="__codelineno-15-154" name="__codelineno-15-154"></a><span class="w">      </span><span class="n">HSSFSheet</span><span class="w"> </span><span class="n">sheet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wb</span><span class="p">.</span><span class="n">createSheet</span><span class="p">(</span><span class="n">worksheet_name</span><span class="p">);</span>
<a id="__codelineno-15-155" name="__codelineno-15-155"></a>
<a id="__codelineno-15-156" name="__codelineno-15-156"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="n">Header</span><span class="w"> </span><span class="n">title</span>
<a id="__codelineno-15-157" name="__codelineno-15-157"></a><span class="w">      </span><span class="n">HSSFRow</span><span class="w"> </span><span class="n">row1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sheet</span><span class="p">.</span><span class="n">createRow</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<a id="__codelineno-15-158" name="__codelineno-15-158"></a><span class="w">      </span><span class="n">HSSFCell</span><span class="w"> </span><span class="n">cell</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">row1</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<a id="__codelineno-15-159" name="__codelineno-15-159"></a><span class="w">      </span><span class="n">cell</span><span class="p">.</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">title</span><span class="p">);</span>
<a id="__codelineno-15-160" name="__codelineno-15-160"></a><span class="w">      </span><span class="n">sheet</span><span class="p">.</span><span class="n">addMergedRegion</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">CellRangeAddress</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">));</span>
<a id="__codelineno-15-161" name="__codelineno-15-161"></a>
<a id="__codelineno-15-162" name="__codelineno-15-162"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="n">Header</span>
<a id="__codelineno-15-163" name="__codelineno-15-163"></a><span class="w">      </span><span class="n">HSSFRow</span><span class="w"> </span><span class="n">row2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sheet</span><span class="p">.</span><span class="n">createRow</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
<a id="__codelineno-15-164" name="__codelineno-15-164"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="err">设置列标题</span>
<a id="__codelineno-15-165" name="__codelineno-15-165"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;学号&quot;</span><span class="p">);</span>
<a id="__codelineno-15-166" name="__codelineno-15-166"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">1</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;姓名&quot;</span><span class="p">);</span>
<a id="__codelineno-15-167" name="__codelineno-15-167"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">2</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;性别&quot;</span><span class="p">);</span>
<a id="__codelineno-15-168" name="__codelineno-15-168"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">3</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;年龄&quot;</span><span class="p">);</span>
<a id="__codelineno-15-169" name="__codelineno-15-169"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">4</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;所在系&quot;</span><span class="p">);</span>
<a id="__codelineno-15-170" name="__codelineno-15-170"></a>
<a id="__codelineno-15-171" name="__codelineno-15-171"></a><span class="w">      </span><span class="n">wb</span><span class="p">.</span><span class="k">write</span><span class="p">(</span><span class="k">output</span><span class="p">);</span>
<a id="__codelineno-15-172" name="__codelineno-15-172"></a><span class="w">      </span><span class="o">//</span><span class="n">wb</span><span class="p">.</span><span class="k">close</span><span class="p">();</span>
<a id="__codelineno-15-173" name="__codelineno-15-173"></a><span class="w">    </span><span class="err">}</span><span class="w"> </span><span class="n">catch</span><span class="w"> </span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-174" name="__codelineno-15-174"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">EXPORT_EXCEL_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-175" name="__codelineno-15-175"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-176" name="__codelineno-15-176"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-177" name="__codelineno-15-177"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-178" name="__codelineno-15-178"></a>
<a id="__codelineno-15-179" name="__codelineno-15-179"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-180" name="__codelineno-15-180"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-181" name="__codelineno-15-181"></a>
<a id="__codelineno-15-182" name="__codelineno-15-182"></a><span class="w">  </span><span class="o">@</span><span class="n">Override</span>
<a id="__codelineno-15-183" name="__codelineno-15-183"></a><span class="w">  </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="w"> </span><span class="n">export2XLS</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="k">data</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">worksheet_name</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">OutputStream</span><span class="w"> </span><span class="k">output</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-184" name="__codelineno-15-184"></a><span class="w">    </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Boolean</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-15-185" name="__codelineno-15-185"></a>
<a id="__codelineno-15-186" name="__codelineno-15-186"></a><span class="w">    </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-187" name="__codelineno-15-187"></a><span class="w">      </span><span class="n">HSSFWorkbook</span><span class="w"> </span><span class="n">wb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HSSFWorkbook</span><span class="p">();</span>
<a id="__codelineno-15-188" name="__codelineno-15-188"></a><span class="w">      </span><span class="n">HSSFSheet</span><span class="w"> </span><span class="n">sheet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">wb</span><span class="p">.</span><span class="n">createSheet</span><span class="p">(</span><span class="n">worksheet_name</span><span class="p">);</span>
<a id="__codelineno-15-189" name="__codelineno-15-189"></a>
<a id="__codelineno-15-190" name="__codelineno-15-190"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="n">Header</span><span class="w"> </span><span class="n">title</span>
<a id="__codelineno-15-191" name="__codelineno-15-191"></a><span class="w">      </span><span class="n">HSSFRow</span><span class="w"> </span><span class="n">row1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sheet</span><span class="p">.</span><span class="n">createRow</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<a id="__codelineno-15-192" name="__codelineno-15-192"></a><span class="w">      </span><span class="n">HSSFCell</span><span class="w"> </span><span class="n">cell</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">row1</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<a id="__codelineno-15-193" name="__codelineno-15-193"></a><span class="w">      </span><span class="n">cell</span><span class="p">.</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">title</span><span class="p">);</span>
<a id="__codelineno-15-194" name="__codelineno-15-194"></a><span class="w">      </span><span class="n">sheet</span><span class="p">.</span><span class="n">addMergedRegion</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">CellRangeAddress</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">));</span>
<a id="__codelineno-15-195" name="__codelineno-15-195"></a>
<a id="__codelineno-15-196" name="__codelineno-15-196"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="n">Header</span>
<a id="__codelineno-15-197" name="__codelineno-15-197"></a><span class="w">      </span><span class="n">HSSFRow</span><span class="w"> </span><span class="n">row2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sheet</span><span class="p">.</span><span class="n">createRow</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
<a id="__codelineno-15-198" name="__codelineno-15-198"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="err">设置列标题</span>
<a id="__codelineno-15-199" name="__codelineno-15-199"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;Id&quot;</span><span class="p">);</span>
<a id="__codelineno-15-200" name="__codelineno-15-200"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">1</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;学号&quot;</span><span class="p">);</span>
<a id="__codelineno-15-201" name="__codelineno-15-201"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">2</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;姓名&quot;</span><span class="p">);</span>
<a id="__codelineno-15-202" name="__codelineno-15-202"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">3</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;性别&quot;</span><span class="p">);</span>
<a id="__codelineno-15-203" name="__codelineno-15-203"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">4</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;年龄&quot;</span><span class="p">);</span>
<a id="__codelineno-15-204" name="__codelineno-15-204"></a><span class="w">      </span><span class="n">row2</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">5</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="ss">&quot;所在系&quot;</span><span class="p">);</span>
<a id="__codelineno-15-205" name="__codelineno-15-205"></a>
<a id="__codelineno-15-206" name="__codelineno-15-206"></a><span class="w">      </span><span class="o">//</span><span class="w"> </span><span class="err">填充数据</span>
<a id="__codelineno-15-207" name="__codelineno-15-207"></a><span class="w">      </span><span class="nb">int</span><span class="w"> </span><span class="n">row_number</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<a id="__codelineno-15-208" name="__codelineno-15-208"></a><span class="w">      </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">Student</span><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">data</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-209" name="__codelineno-15-209"></a><span class="w">        </span><span class="n">HSSFRow</span><span class="w"> </span><span class="n">row_new</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sheet</span><span class="p">.</span><span class="n">createRow</span><span class="p">(</span><span class="n">row_number</span><span class="o">++</span><span class="p">);</span>
<a id="__codelineno-15-210" name="__codelineno-15-210"></a><span class="w">        </span><span class="n">row_new</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">NullValue</span><span class="p">(</span><span class="n">item</span><span class="p">.</span><span class="n">getId</span><span class="p">()));</span>
<a id="__codelineno-15-211" name="__codelineno-15-211"></a><span class="w">        </span><span class="n">row_new</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">1</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">NullValue</span><span class="p">(</span><span class="n">item</span><span class="p">.</span><span class="n">getNo</span><span class="p">()));</span>
<a id="__codelineno-15-212" name="__codelineno-15-212"></a><span class="w">        </span><span class="n">row_new</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">2</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">NullValue</span><span class="p">(</span><span class="n">item</span><span class="p">.</span><span class="n">getName</span><span class="p">()));</span>
<a id="__codelineno-15-213" name="__codelineno-15-213"></a><span class="w">        </span><span class="n">row_new</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">3</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">NullValue</span><span class="p">(</span><span class="n">item</span><span class="p">.</span><span class="n">getGender</span><span class="p">()));</span>
<a id="__codelineno-15-214" name="__codelineno-15-214"></a><span class="w">        </span><span class="n">row_new</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">4</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">NullValue</span><span class="p">(</span><span class="n">item</span><span class="p">.</span><span class="n">getAge</span><span class="p">()));</span>
<a id="__codelineno-15-215" name="__codelineno-15-215"></a><span class="w">        </span><span class="n">row_new</span><span class="p">.</span><span class="n">createCell</span><span class="p">(</span><span class="mi">5</span><span class="p">).</span><span class="n">setCellValue</span><span class="p">(</span><span class="n">NullValue</span><span class="p">(</span><span class="n">item</span><span class="p">.</span><span class="n">getDept</span><span class="p">()));</span>
<a id="__codelineno-15-216" name="__codelineno-15-216"></a><span class="w">      </span><span class="err">}</span>
<a id="__codelineno-15-217" name="__codelineno-15-217"></a><span class="w">      </span><span class="n">wb</span><span class="p">.</span><span class="k">write</span><span class="p">(</span><span class="k">output</span><span class="p">);</span>
<a id="__codelineno-15-218" name="__codelineno-15-218"></a><span class="w">      </span><span class="o">//</span><span class="n">wb</span><span class="p">.</span><span class="k">close</span><span class="p">();</span>
<a id="__codelineno-15-219" name="__codelineno-15-219"></a><span class="w">    </span><span class="err">}</span><span class="w"> </span><span class="n">catch</span><span class="w"> </span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-220" name="__codelineno-15-220"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setErr</span><span class="p">(</span><span class="n">ErrEnum</span><span class="p">.</span><span class="n">EXPORT_EXCEL_FAIL</span><span class="p">);</span>
<a id="__codelineno-15-221" name="__codelineno-15-221"></a><span class="w">      </span><span class="n">oc</span><span class="p">.</span><span class="n">setDetail</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-15-222" name="__codelineno-15-222"></a><span class="w">      </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-15-223" name="__codelineno-15-223"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-15-224" name="__codelineno-15-224"></a>
<a id="__codelineno-15-225" name="__codelineno-15-225"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-15-226" name="__codelineno-15-226"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-227" name="__codelineno-15-227"></a>
<a id="__codelineno-15-228" name="__codelineno-15-228"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">NullValue</span><span class="p">(</span><span class="k">Object</span><span class="w"> </span><span class="n">o</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-15-229" name="__codelineno-15-229"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="k">null</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">o</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="ss">&quot;&quot;</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">o</span><span class="p">.</span><span class="n">toString</span><span class="p">();</span>
<a id="__codelineno-15-230" name="__codelineno-15-230"></a><span class="w">  </span><span class="err">}</span>
<a id="__codelineno-15-231" name="__codelineno-15-231"></a><span class="err">}</span>
</code></pre></div></td></tr></table></div>
</details>
</li>
<li>
<p>创建<code>StudentController</code>，实现学生表CRUD操作Web Api，参考代码如下：</p>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">StudentController</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-16-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-16-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-16-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-16-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-16-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-16-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-16-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-16-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-16-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-16-10">10</a></span>
<span class="normal"><a href="#__codelineno-16-11">11</a></span>
<span class="normal"><a href="#__codelineno-16-12">12</a></span>
<span class="normal"><a href="#__codelineno-16-13">13</a></span>
<span class="normal"><a href="#__codelineno-16-14">14</a></span>
<span class="normal"><a href="#__codelineno-16-15">15</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1"></a><span class="nd">@RestController</span>
<a id="__codelineno-16-2" name="__codelineno-16-2"></a><span class="nd">@RequestMapping</span><span class="p">(</span><span class="s">&quot;/demo/Student&quot;</span><span class="p">)</span>
<a id="__codelineno-16-3" name="__codelineno-16-3"></a><span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">StudentController</span><span class="p">{</span><span class="w">      </span>
<a id="__codelineno-16-4" name="__codelineno-16-4"></a><span class="w">  </span><span class="nd">@Autowired</span>
<a id="__codelineno-16-5" name="__codelineno-16-5"></a><span class="w">  </span><span class="kd">private</span><span class="w"> </span><span class="n">StudentServiceImpl</span><span class="w"> </span><span class="n">studentService</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span><span class="p">;</span>
<a id="__codelineno-16-6" name="__codelineno-16-6"></a>
<a id="__codelineno-16-7" name="__codelineno-16-7"></a><span class="w">  </span><span class="nd">@PostMapping</span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;/add&quot;</span><span class="p">)</span>
<a id="__codelineno-16-8" name="__codelineno-16-8"></a><span class="w">  </span><span class="kd">public</span><span class="w"> </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">doAdd</span><span class="p">(</span><span class="nd">@RequestBody</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="kc">true</span><span class="p">)</span><span class="w"> </span><span class="nd">@Validated</span><span class="w"> </span><span class="n">Student</span><span class="w"> </span><span class="n">o</span><span class="p">){</span>
<a id="__codelineno-16-9" name="__codelineno-16-9"></a><span class="w">    </span><span class="n">Result</span><span class="o">&lt;</span><span class="n">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">o</span><span class="p">);</span>
<a id="__codelineno-16-10" name="__codelineno-16-10"></a>
<a id="__codelineno-16-11" name="__codelineno-16-11"></a><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-16-12" name="__codelineno-16-12"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-16-13" name="__codelineno-16-13"></a>
<a id="__codelineno-16-14" name="__codelineno-16-14"></a><span class="w">  </span><span class="c1">//...</span>
<a id="__codelineno-16-15" name="__codelineno-16-15"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>StudentController.java</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/src/main/java/xust/stu/demo/controller/StudentController.java</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-17-1">  1</a></span>
<span class="normal"><a href="#__codelineno-17-2">  2</a></span>
<span class="normal"><a href="#__codelineno-17-3">  3</a></span>
<span class="normal"><a href="#__codelineno-17-4">  4</a></span>
<span class="normal"><a href="#__codelineno-17-5">  5</a></span>
<span class="normal"><a href="#__codelineno-17-6">  6</a></span>
<span class="normal"><a href="#__codelineno-17-7">  7</a></span>
<span class="normal"><a href="#__codelineno-17-8">  8</a></span>
<span class="normal"><a href="#__codelineno-17-9">  9</a></span>
<span class="normal"><a href="#__codelineno-17-10"> 10</a></span>
<span class="normal"><a href="#__codelineno-17-11"> 11</a></span>
<span class="normal"><a href="#__codelineno-17-12"> 12</a></span>
<span class="normal"><a href="#__codelineno-17-13"> 13</a></span>
<span class="normal"><a href="#__codelineno-17-14"> 14</a></span>
<span class="normal"><a href="#__codelineno-17-15"> 15</a></span>
<span class="normal"><a href="#__codelineno-17-16"> 16</a></span>
<span class="normal"><a href="#__codelineno-17-17"> 17</a></span>
<span class="normal"><a href="#__codelineno-17-18"> 18</a></span>
<span class="normal"><a href="#__codelineno-17-19"> 19</a></span>
<span class="normal"><a href="#__codelineno-17-20"> 20</a></span>
<span class="normal"><a href="#__codelineno-17-21"> 21</a></span>
<span class="normal"><a href="#__codelineno-17-22"> 22</a></span>
<span class="normal"><a href="#__codelineno-17-23"> 23</a></span>
<span class="normal"><a href="#__codelineno-17-24"> 24</a></span>
<span class="normal"><a href="#__codelineno-17-25"> 25</a></span>
<span class="normal"><a href="#__codelineno-17-26"> 26</a></span>
<span class="normal"><a href="#__codelineno-17-27"> 27</a></span>
<span class="normal"><a href="#__codelineno-17-28"> 28</a></span>
<span class="normal"><a href="#__codelineno-17-29"> 29</a></span>
<span class="normal"><a href="#__codelineno-17-30"> 30</a></span>
<span class="normal"><a href="#__codelineno-17-31"> 31</a></span>
<span class="normal"><a href="#__codelineno-17-32"> 32</a></span>
<span class="normal"><a href="#__codelineno-17-33"> 33</a></span>
<span class="normal"><a href="#__codelineno-17-34"> 34</a></span>
<span class="normal"><a href="#__codelineno-17-35"> 35</a></span>
<span class="normal"><a href="#__codelineno-17-36"> 36</a></span>
<span class="normal"><a href="#__codelineno-17-37"> 37</a></span>
<span class="normal"><a href="#__codelineno-17-38"> 38</a></span>
<span class="normal"><a href="#__codelineno-17-39"> 39</a></span>
<span class="normal"><a href="#__codelineno-17-40"> 40</a></span>
<span class="normal"><a href="#__codelineno-17-41"> 41</a></span>
<span class="normal"><a href="#__codelineno-17-42"> 42</a></span>
<span class="normal"><a href="#__codelineno-17-43"> 43</a></span>
<span class="normal"><a href="#__codelineno-17-44"> 44</a></span>
<span class="normal"><a href="#__codelineno-17-45"> 45</a></span>
<span class="normal"><a href="#__codelineno-17-46"> 46</a></span>
<span class="normal"><a href="#__codelineno-17-47"> 47</a></span>
<span class="normal"><a href="#__codelineno-17-48"> 48</a></span>
<span class="normal"><a href="#__codelineno-17-49"> 49</a></span>
<span class="normal"><a href="#__codelineno-17-50"> 50</a></span>
<span class="normal"><a href="#__codelineno-17-51"> 51</a></span>
<span class="normal"><a href="#__codelineno-17-52"> 52</a></span>
<span class="normal"><a href="#__codelineno-17-53"> 53</a></span>
<span class="normal"><a href="#__codelineno-17-54"> 54</a></span>
<span class="normal"><a href="#__codelineno-17-55"> 55</a></span>
<span class="normal"><a href="#__codelineno-17-56"> 56</a></span>
<span class="normal"><a href="#__codelineno-17-57"> 57</a></span>
<span class="normal"><a href="#__codelineno-17-58"> 58</a></span>
<span class="normal"><a href="#__codelineno-17-59"> 59</a></span>
<span class="normal"><a href="#__codelineno-17-60"> 60</a></span>
<span class="normal"><a href="#__codelineno-17-61"> 61</a></span>
<span class="normal"><a href="#__codelineno-17-62"> 62</a></span>
<span class="normal"><a href="#__codelineno-17-63"> 63</a></span>
<span class="normal"><a href="#__codelineno-17-64"> 64</a></span>
<span class="normal"><a href="#__codelineno-17-65"> 65</a></span>
<span class="normal"><a href="#__codelineno-17-66"> 66</a></span>
<span class="normal"><a href="#__codelineno-17-67"> 67</a></span>
<span class="normal"><a href="#__codelineno-17-68"> 68</a></span>
<span class="normal"><a href="#__codelineno-17-69"> 69</a></span>
<span class="normal"><a href="#__codelineno-17-70"> 70</a></span>
<span class="normal"><a href="#__codelineno-17-71"> 71</a></span>
<span class="normal"><a href="#__codelineno-17-72"> 72</a></span>
<span class="normal"><a href="#__codelineno-17-73"> 73</a></span>
<span class="normal"><a href="#__codelineno-17-74"> 74</a></span>
<span class="normal"><a href="#__codelineno-17-75"> 75</a></span>
<span class="normal"><a href="#__codelineno-17-76"> 76</a></span>
<span class="normal"><a href="#__codelineno-17-77"> 77</a></span>
<span class="normal"><a href="#__codelineno-17-78"> 78</a></span>
<span class="normal"><a href="#__codelineno-17-79"> 79</a></span>
<span class="normal"><a href="#__codelineno-17-80"> 80</a></span>
<span class="normal"><a href="#__codelineno-17-81"> 81</a></span>
<span class="normal"><a href="#__codelineno-17-82"> 82</a></span>
<span class="normal"><a href="#__codelineno-17-83"> 83</a></span>
<span class="normal"><a href="#__codelineno-17-84"> 84</a></span>
<span class="normal"><a href="#__codelineno-17-85"> 85</a></span>
<span class="normal"><a href="#__codelineno-17-86"> 86</a></span>
<span class="normal"><a href="#__codelineno-17-87"> 87</a></span>
<span class="normal"><a href="#__codelineno-17-88"> 88</a></span>
<span class="normal"><a href="#__codelineno-17-89"> 89</a></span>
<span class="normal"><a href="#__codelineno-17-90"> 90</a></span>
<span class="normal"><a href="#__codelineno-17-91"> 91</a></span>
<span class="normal"><a href="#__codelineno-17-92"> 92</a></span>
<span class="normal"><a href="#__codelineno-17-93"> 93</a></span>
<span class="normal"><a href="#__codelineno-17-94"> 94</a></span>
<span class="normal"><a href="#__codelineno-17-95"> 95</a></span>
<span class="normal"><a href="#__codelineno-17-96"> 96</a></span>
<span class="normal"><a href="#__codelineno-17-97"> 97</a></span>
<span class="normal"><a href="#__codelineno-17-98"> 98</a></span>
<span class="normal"><a href="#__codelineno-17-99"> 99</a></span>
<span class="normal"><a href="#__codelineno-17-100">100</a></span>
<span class="normal"><a href="#__codelineno-17-101">101</a></span>
<span class="normal"><a href="#__codelineno-17-102">102</a></span>
<span class="normal"><a href="#__codelineno-17-103">103</a></span>
<span class="normal"><a href="#__codelineno-17-104">104</a></span>
<span class="normal"><a href="#__codelineno-17-105">105</a></span>
<span class="normal"><a href="#__codelineno-17-106">106</a></span>
<span class="normal"><a href="#__codelineno-17-107">107</a></span>
<span class="normal"><a href="#__codelineno-17-108">108</a></span>
<span class="normal"><a href="#__codelineno-17-109">109</a></span>
<span class="normal"><a href="#__codelineno-17-110">110</a></span>
<span class="normal"><a href="#__codelineno-17-111">111</a></span>
<span class="normal"><a href="#__codelineno-17-112">112</a></span>
<span class="normal"><a href="#__codelineno-17-113">113</a></span>
<span class="normal"><a href="#__codelineno-17-114">114</a></span>
<span class="normal"><a href="#__codelineno-17-115">115</a></span>
<span class="normal"><a href="#__codelineno-17-116">116</a></span>
<span class="normal"><a href="#__codelineno-17-117">117</a></span>
<span class="normal"><a href="#__codelineno-17-118">118</a></span>
<span class="normal"><a href="#__codelineno-17-119">119</a></span>
<span class="normal"><a href="#__codelineno-17-120">120</a></span>
<span class="normal"><a href="#__codelineno-17-121">121</a></span>
<span class="normal"><a href="#__codelineno-17-122">122</a></span>
<span class="normal"><a href="#__codelineno-17-123">123</a></span>
<span class="normal"><a href="#__codelineno-17-124">124</a></span>
<span class="normal"><a href="#__codelineno-17-125">125</a></span>
<span class="normal"><a href="#__codelineno-17-126">126</a></span>
<span class="normal"><a href="#__codelineno-17-127">127</a></span>
<span class="normal"><a href="#__codelineno-17-128">128</a></span>
<span class="normal"><a href="#__codelineno-17-129">129</a></span>
<span class="normal"><a href="#__codelineno-17-130">130</a></span>
<span class="normal"><a href="#__codelineno-17-131">131</a></span>
<span class="normal"><a href="#__codelineno-17-132">132</a></span>
<span class="normal"><a href="#__codelineno-17-133">133</a></span>
<span class="normal"><a href="#__codelineno-17-134">134</a></span>
<span class="normal"><a href="#__codelineno-17-135">135</a></span>
<span class="normal"><a href="#__codelineno-17-136">136</a></span>
<span class="normal"><a href="#__codelineno-17-137">137</a></span>
<span class="normal"><a href="#__codelineno-17-138">138</a></span>
<span class="normal"><a href="#__codelineno-17-139">139</a></span>
<span class="normal"><a href="#__codelineno-17-140">140</a></span>
<span class="normal"><a href="#__codelineno-17-141">141</a></span>
<span class="normal"><a href="#__codelineno-17-142">142</a></span>
<span class="normal"><a href="#__codelineno-17-143">143</a></span>
<span class="normal"><a href="#__codelineno-17-144">144</a></span>
<span class="normal"><a href="#__codelineno-17-145">145</a></span>
<span class="normal"><a href="#__codelineno-17-146">146</a></span>
<span class="normal"><a href="#__codelineno-17-147">147</a></span>
<span class="normal"><a href="#__codelineno-17-148">148</a></span>
<span class="normal"><a href="#__codelineno-17-149">149</a></span>
<span class="normal"><a href="#__codelineno-17-150">150</a></span>
<span class="normal"><a href="#__codelineno-17-151">151</a></span>
<span class="normal"><a href="#__codelineno-17-152">152</a></span>
<span class="normal"><a href="#__codelineno-17-153">153</a></span>
<span class="normal"><a href="#__codelineno-17-154">154</a></span>
<span class="normal"><a href="#__codelineno-17-155">155</a></span>
<span class="normal"><a href="#__codelineno-17-156">156</a></span>
<span class="normal"><a href="#__codelineno-17-157">157</a></span>
<span class="normal"><a href="#__codelineno-17-158">158</a></span>
<span class="normal"><a href="#__codelineno-17-159">159</a></span>
<span class="normal"><a href="#__codelineno-17-160">160</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-17-1" name="__codelineno-17-1"></a><span class="cm">/*</span>
<a id="__codelineno-17-2" name="__codelineno-17-2"></a><span class="cm"> * File name : StudentController.java 2023-04-20</span>
<a id="__codelineno-17-3" name="__codelineno-17-3"></a><span class="cm"> * Copyright 2023 XUST. All rights reserved.</span>
<a id="__codelineno-17-4" name="__codelineno-17-4"></a><span class="cm"> */</span>
<a id="__codelineno-17-5" name="__codelineno-17-5"></a><span class="n">package</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="n">controller</span><span class="p">;</span>
<a id="__codelineno-17-6" name="__codelineno-17-6"></a>
<a id="__codelineno-17-7" name="__codelineno-17-7"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">HashMap</span><span class="p">;</span>
<a id="__codelineno-17-8" name="__codelineno-17-8"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="k">Map</span><span class="p">;</span>
<a id="__codelineno-17-9" name="__codelineno-17-9"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">io</span><span class="p">.</span><span class="n">OutputStream</span><span class="p">;</span>
<a id="__codelineno-17-10" name="__codelineno-17-10"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">ArrayList</span><span class="p">;</span>
<a id="__codelineno-17-11" name="__codelineno-17-11"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">net</span><span class="p">.</span><span class="n">URLEncoder</span><span class="p">;</span>
<a id="__codelineno-17-12" name="__codelineno-17-12"></a><span class="n">import</span><span class="w"> </span><span class="n">jakarta</span><span class="p">.</span><span class="n">servlet</span><span class="p">.</span><span class="n">http</span><span class="p">.</span><span class="n">HttpServletResponse</span><span class="p">;</span>
<a id="__codelineno-17-13" name="__codelineno-17-13"></a>
<a id="__codelineno-17-14" name="__codelineno-17-14"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">slf4j</span><span class="p">.</span><span class="n">Logger</span><span class="p">;</span>
<a id="__codelineno-17-15" name="__codelineno-17-15"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">slf4j</span><span class="p">.</span><span class="n">LoggerFactory</span><span class="p">;</span>
<a id="__codelineno-17-16" name="__codelineno-17-16"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">beans</span><span class="p">.</span><span class="n">factory</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">Autowired</span><span class="p">;</span>
<a id="__codelineno-17-17" name="__codelineno-17-17"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">web</span><span class="p">.</span><span class="n">bind</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">RequestBody</span><span class="p">;</span>
<a id="__codelineno-17-18" name="__codelineno-17-18"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">web</span><span class="p">.</span><span class="n">bind</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">PostMapping</span><span class="p">;</span>
<a id="__codelineno-17-19" name="__codelineno-17-19"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">web</span><span class="p">.</span><span class="n">bind</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">RequestMapping</span><span class="p">;</span>
<a id="__codelineno-17-20" name="__codelineno-17-20"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">web</span><span class="p">.</span><span class="n">bind</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">RequestParam</span><span class="p">;</span>
<a id="__codelineno-17-21" name="__codelineno-17-21"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">web</span><span class="p">.</span><span class="n">bind</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">RestController</span><span class="p">;</span>
<a id="__codelineno-17-22" name="__codelineno-17-22"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">web</span><span class="p">.</span><span class="n">servlet</span><span class="p">.</span><span class="n">ModelAndView</span><span class="p">;</span>
<a id="__codelineno-17-23" name="__codelineno-17-23"></a>
<a id="__codelineno-17-24" name="__codelineno-17-24"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">List</span><span class="p">;</span>
<a id="__codelineno-17-25" name="__codelineno-17-25"></a><span class="n">import</span><span class="w"> </span><span class="n">org</span><span class="p">.</span><span class="n">springframework</span><span class="p">.</span><span class="n">validation</span><span class="p">.</span><span class="n">annotation</span><span class="p">.</span><span class="n">Validated</span><span class="p">;</span>
<a id="__codelineno-17-26" name="__codelineno-17-26"></a>
<a id="__codelineno-17-27" name="__codelineno-17-27"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="k">Result</span><span class="p">;</span>
<a id="__codelineno-17-28" name="__codelineno-17-28"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">Result4GetPage</span><span class="p">;</span>
<a id="__codelineno-17-29" name="__codelineno-17-29"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">.</span><span class="n">DeleteItems4Student</span><span class="p">;</span>
<a id="__codelineno-17-30" name="__codelineno-17-30"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">.</span><span class="n">GetPage4Student</span><span class="p">;</span>
<a id="__codelineno-17-31" name="__codelineno-17-31"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="k">domain</span><span class="p">.</span><span class="n">Student</span><span class="p">;</span>
<a id="__codelineno-17-32" name="__codelineno-17-32"></a><span class="n">import</span><span class="w"> </span><span class="n">xust</span><span class="p">.</span><span class="n">stu</span><span class="p">.</span><span class="n">demo</span><span class="p">.</span><span class="n">service</span><span class="p">.</span><span class="n">StudentServiceImpl</span><span class="p">;</span>
<a id="__codelineno-17-33" name="__codelineno-17-33"></a>
<a id="__codelineno-17-34" name="__codelineno-17-34"></a><span class="n">import</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="n">util</span><span class="p">.</span><span class="n">TreeMap</span><span class="p">;</span>
<a id="__codelineno-17-35" name="__codelineno-17-35"></a>
<a id="__codelineno-17-36" name="__codelineno-17-36"></a><span class="cm">/**</span>
<a id="__codelineno-17-37" name="__codelineno-17-37"></a><span class="cm"> * Class StudentController</span>
<a id="__codelineno-17-38" name="__codelineno-17-38"></a><span class="cm"> * Student action class.</span>
<a id="__codelineno-17-39" name="__codelineno-17-39"></a><span class="cm"> * @generated May 28, 2023, 9:37:49 AM</span>
<a id="__codelineno-17-40" name="__codelineno-17-40"></a><span class="cm"> * @author XUST</span>
<a id="__codelineno-17-41" name="__codelineno-17-41"></a><span class="cm"> * @version 1.0, 2023-04-20</span>
<a id="__codelineno-17-42" name="__codelineno-17-42"></a><span class="cm"> */</span>
<a id="__codelineno-17-43" name="__codelineno-17-43"></a><span class="o">@</span><span class="n">RestController</span>
<a id="__codelineno-17-44" name="__codelineno-17-44"></a><span class="o">@</span><span class="n">RequestMapping</span><span class="p">(</span><span class="ss">&quot;/demo/Student&quot;</span><span class="p">)</span>
<a id="__codelineno-17-45" name="__codelineno-17-45"></a><span class="k">public</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="n">StudentController</span><span class="err">{</span>
<a id="__codelineno-17-46" name="__codelineno-17-46"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="k">final</span><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="n">Logger</span><span class="w"> </span><span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">LoggerFactory</span><span class="p">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">StudentController</span><span class="p">.</span><span class="k">class</span><span class="p">);</span>
<a id="__codelineno-17-47" name="__codelineno-17-47"></a>
<a id="__codelineno-17-48" name="__codelineno-17-48"></a><span class="w">  </span><span class="o">@</span><span class="n">Autowired</span>
<a id="__codelineno-17-49" name="__codelineno-17-49"></a><span class="w">  </span><span class="n">private</span><span class="w"> </span><span class="n">StudentServiceImpl</span><span class="w"> </span><span class="n">studentService</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span>
<a id="__codelineno-17-50" name="__codelineno-17-50"></a>
<a id="__codelineno-17-51" name="__codelineno-17-51"></a><span class="w">    </span><span class="o">@</span><span class="n">RequestMapping</span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">&quot;/list-jquery&quot;</span><span class="p">)</span>
<a id="__codelineno-17-52" name="__codelineno-17-52"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">ModelAndView</span><span class="w"> </span><span class="n">doListJquery</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-17-53" name="__codelineno-17-53"></a><span class="w">        </span><span class="n">ModelAndView</span><span class="w"> </span><span class="n">mv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ModelAndView</span><span class="p">(</span><span class="ss">&quot;/demo/Student/list-jquery&quot;</span><span class="p">);</span>
<a id="__codelineno-17-54" name="__codelineno-17-54"></a>
<a id="__codelineno-17-55" name="__codelineno-17-55"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">mv</span><span class="p">;</span>
<a id="__codelineno-17-56" name="__codelineno-17-56"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-57" name="__codelineno-17-57"></a><span class="w">    </span><span class="o">@</span><span class="n">RequestMapping</span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">&quot;/list-bootstrap&quot;</span><span class="p">)</span>
<a id="__codelineno-17-58" name="__codelineno-17-58"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">ModelAndView</span><span class="w"> </span><span class="n">doListBootstrap</span><span class="p">()</span><span class="err">{</span>
<a id="__codelineno-17-59" name="__codelineno-17-59"></a><span class="w">        </span><span class="n">ModelAndView</span><span class="w"> </span><span class="n">mv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ModelAndView</span><span class="p">(</span><span class="ss">&quot;/demo/Student/list-bootstrap&quot;</span><span class="p">);</span>
<a id="__codelineno-17-60" name="__codelineno-17-60"></a>
<a id="__codelineno-17-61" name="__codelineno-17-61"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">mv</span><span class="p">;</span>
<a id="__codelineno-17-62" name="__codelineno-17-62"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-63" name="__codelineno-17-63"></a>
<a id="__codelineno-17-64" name="__codelineno-17-64"></a><span class="w">    </span><span class="o">@</span><span class="n">PostMapping</span><span class="p">(</span><span class="n">value</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">&quot;/add&quot;</span><span class="p">)</span>
<a id="__codelineno-17-65" name="__codelineno-17-65"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="n">doAdd</span><span class="p">(</span><span class="o">@</span><span class="n">RequestBody</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="k">true</span><span class="p">)</span><span class="w"> </span><span class="o">@</span><span class="n">Validated</span><span class="w"> </span><span class="n">Student</span><span class="w"> </span><span class="n">o</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-66" name="__codelineno-17-66"></a><span class="w">        </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="k">create</span><span class="p">(</span><span class="n">o</span><span class="p">);</span>
<a id="__codelineno-17-67" name="__codelineno-17-67"></a>
<a id="__codelineno-17-68" name="__codelineno-17-68"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-17-69" name="__codelineno-17-69"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-70" name="__codelineno-17-70"></a>
<a id="__codelineno-17-71" name="__codelineno-17-71"></a><span class="w">    </span><span class="o">@</span><span class="n">PostMapping</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="ss">&quot;/delete&quot;</span><span class="p">)</span>
<a id="__codelineno-17-72" name="__codelineno-17-72"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">doDelete</span><span class="p">(</span><span class="o">@</span><span class="n">RequestBody</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="k">true</span><span class="p">)</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ids</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-73" name="__codelineno-17-73"></a><span class="w">        </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="n">deleteItems</span><span class="p">(</span><span class="n">ids</span><span class="p">);</span>
<a id="__codelineno-17-74" name="__codelineno-17-74"></a>
<a id="__codelineno-17-75" name="__codelineno-17-75"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-17-76" name="__codelineno-17-76"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-77" name="__codelineno-17-77"></a>
<a id="__codelineno-17-78" name="__codelineno-17-78"></a><span class="w">    </span><span class="o">@</span><span class="n">PostMapping</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="ss">&quot;/update&quot;</span><span class="p">)</span>
<a id="__codelineno-17-79" name="__codelineno-17-79"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">doUpdate</span><span class="p">(</span><span class="o">@</span><span class="n">RequestBody</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="k">true</span><span class="p">)</span><span class="w"> </span><span class="o">@</span><span class="n">Validated</span><span class="w"> </span><span class="n">Student</span><span class="w"> </span><span class="n">o</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-80" name="__codelineno-17-80"></a><span class="w">        </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="k">update</span><span class="p">(</span><span class="n">o</span><span class="p">);</span>
<a id="__codelineno-17-81" name="__codelineno-17-81"></a>
<a id="__codelineno-17-82" name="__codelineno-17-82"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">oc</span><span class="p">;</span>
<a id="__codelineno-17-83" name="__codelineno-17-83"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-84" name="__codelineno-17-84"></a>
<a id="__codelineno-17-85" name="__codelineno-17-85"></a><span class="w">    </span><span class="o">@</span><span class="n">PostMapping</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="ss">&quot;/getPage&quot;</span><span class="p">)</span>
<a id="__codelineno-17-86" name="__codelineno-17-86"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Result4GetPage</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;&gt;</span><span class="w"> </span><span class="n">doGetPage</span><span class="p">(</span><span class="o">@</span><span class="n">RequestBody</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="k">true</span><span class="p">)</span><span class="w"> </span><span class="o">@</span><span class="n">Validated</span><span class="w"> </span><span class="n">GetPage4Student</span><span class="w"> </span><span class="n">p</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-87" name="__codelineno-17-87"></a><span class="w">        </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Result4GetPage</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;&gt;</span><span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">Result4GetPage</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;&gt;</span><span class="p">();</span>
<a id="__codelineno-17-88" name="__codelineno-17-88"></a>
<a id="__codelineno-17-89" name="__codelineno-17-89"></a><span class="w">        </span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-17-90" name="__codelineno-17-90"></a><span class="w">        </span><span class="n">params</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="ss">&quot;id&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">getId</span><span class="p">());</span>
<a id="__codelineno-17-91" name="__codelineno-17-91"></a><span class="w">        </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="k">size</span><span class="p">(</span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-17-92" name="__codelineno-17-92"></a><span class="w">        </span><span class="k">if</span><span class="p">(</span><span class="n">oc_size</span><span class="p">.</span><span class="n">getCode</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-93" name="__codelineno-17-93"></a><span class="w">            </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">oc_getPage</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="n">getPage</span><span class="p">(</span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">getPageNum</span><span class="p">(),</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">getPageSize</span><span class="p">());</span>
<a id="__codelineno-17-94" name="__codelineno-17-94"></a><span class="w">            </span><span class="k">if</span><span class="p">(</span><span class="n">oc_getPage</span><span class="p">.</span><span class="n">getCode</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-95" name="__codelineno-17-95"></a><span class="w">                </span><span class="n">Result4GetPage</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="k">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result4GetPage</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="p">();</span>
<a id="__codelineno-17-96" name="__codelineno-17-96"></a><span class="w">                </span><span class="k">result</span><span class="p">.</span><span class="n">setTotal</span><span class="p">(</span><span class="n">oc_size</span><span class="p">.</span><span class="n">getData</span><span class="p">());</span>
<a id="__codelineno-17-97" name="__codelineno-17-97"></a><span class="w">                </span><span class="k">result</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="n">oc_getPage</span><span class="p">.</span><span class="n">getData</span><span class="p">());</span>
<a id="__codelineno-17-98" name="__codelineno-17-98"></a><span class="w">                </span><span class="n">res</span><span class="p">.</span><span class="n">setData</span><span class="p">(</span><span class="k">result</span><span class="p">);</span>
<a id="__codelineno-17-99" name="__codelineno-17-99"></a><span class="w">            </span><span class="err">}</span><span class="k">else</span><span class="err">{</span>
<a id="__codelineno-17-100" name="__codelineno-17-100"></a><span class="w">                </span><span class="n">res</span><span class="p">.</span><span class="n">setCode</span><span class="p">(</span><span class="n">oc_getPage</span><span class="p">.</span><span class="n">getCode</span><span class="p">());</span>
<a id="__codelineno-17-101" name="__codelineno-17-101"></a><span class="w">                </span><span class="n">res</span><span class="p">.</span><span class="n">setMessage</span><span class="p">(</span><span class="n">oc_getPage</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-17-102" name="__codelineno-17-102"></a><span class="w">            </span><span class="err">}</span>
<a id="__codelineno-17-103" name="__codelineno-17-103"></a><span class="w">        </span><span class="err">}</span><span class="k">else</span><span class="err">{</span>
<a id="__codelineno-17-104" name="__codelineno-17-104"></a><span class="w">            </span><span class="n">res</span><span class="p">.</span><span class="n">setCode</span><span class="p">(</span><span class="n">oc_size</span><span class="p">.</span><span class="n">getCode</span><span class="p">());</span>
<a id="__codelineno-17-105" name="__codelineno-17-105"></a><span class="w">            </span><span class="n">res</span><span class="p">.</span><span class="n">setMessage</span><span class="p">(</span><span class="n">oc_size</span><span class="p">.</span><span class="n">getMessage</span><span class="p">());</span>
<a id="__codelineno-17-106" name="__codelineno-17-106"></a><span class="w">        </span><span class="err">}</span>
<a id="__codelineno-17-107" name="__codelineno-17-107"></a>
<a id="__codelineno-17-108" name="__codelineno-17-108"></a><span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">res</span><span class="p">;</span>
<a id="__codelineno-17-109" name="__codelineno-17-109"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-110" name="__codelineno-17-110"></a>
<a id="__codelineno-17-111" name="__codelineno-17-111"></a><span class="w">    </span><span class="o">@</span><span class="n">PostMapping</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="ss">&quot;/template&quot;</span><span class="p">)</span>
<a id="__codelineno-17-112" name="__codelineno-17-112"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">doTemplate</span><span class="p">(</span><span class="n">HttpServletResponse</span><span class="w"> </span><span class="n">response</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-113" name="__codelineno-17-113"></a><span class="w">        </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-114" name="__codelineno-17-114"></a><span class="w">            </span><span class="n">String</span><span class="w"> </span><span class="n">file_name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">&quot;学生表.xls&quot;</span><span class="p">;</span>
<a id="__codelineno-17-115" name="__codelineno-17-115"></a><span class="w">            </span><span class="n">response</span><span class="p">.</span><span class="n">setContentType</span><span class="p">(</span><span class="ss">&quot;application/vnd.ms-excel;charset=utf-8&quot;</span><span class="p">);</span>
<a id="__codelineno-17-116" name="__codelineno-17-116"></a><span class="w">            </span><span class="n">response</span><span class="p">.</span><span class="n">setHeader</span><span class="p">(</span><span class="ss">&quot;Content-disposition&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;attachment;filename=&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">file_name</span><span class="p">);</span>
<a id="__codelineno-17-117" name="__codelineno-17-117"></a><span class="w">            </span><span class="n">response</span><span class="p">.</span><span class="n">flushBuffer</span><span class="p">();</span>
<a id="__codelineno-17-118" name="__codelineno-17-118"></a><span class="w">            </span><span class="n">OutputStream</span><span class="w"> </span><span class="n">outputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">response</span><span class="p">.</span><span class="n">getOutputStream</span><span class="p">();</span>
<a id="__codelineno-17-119" name="__codelineno-17-119"></a><span class="w">            </span><span class="n">studentService</span><span class="p">.</span><span class="n">buildXLSTemplate</span><span class="p">(</span><span class="ss">&quot;学生表&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;学生表&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">outputStream</span><span class="p">);</span>
<a id="__codelineno-17-120" name="__codelineno-17-120"></a><span class="w">            </span><span class="n">outputStream</span><span class="p">.</span><span class="n">flush</span><span class="p">();</span>
<a id="__codelineno-17-121" name="__codelineno-17-121"></a><span class="w">            </span><span class="n">outputStream</span><span class="p">.</span><span class="k">close</span><span class="p">();</span>
<a id="__codelineno-17-122" name="__codelineno-17-122"></a><span class="w">        </span><span class="err">}</span><span class="w"> </span><span class="n">catch</span><span class="w"> </span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-123" name="__codelineno-17-123"></a><span class="w">            </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="n">getLocalizedMessage</span><span class="p">());</span>
<a id="__codelineno-17-124" name="__codelineno-17-124"></a><span class="w">        </span><span class="err">}</span>
<a id="__codelineno-17-125" name="__codelineno-17-125"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-126" name="__codelineno-17-126"></a>
<a id="__codelineno-17-127" name="__codelineno-17-127"></a><span class="w">    </span><span class="o">@</span><span class="n">PostMapping</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="ss">&quot;/toExcel&quot;</span><span class="p">)</span>
<a id="__codelineno-17-128" name="__codelineno-17-128"></a><span class="w">    </span><span class="k">public</span><span class="w"> </span><span class="n">void</span><span class="w"> </span><span class="n">doToExcel</span><span class="p">(</span><span class="n">HttpServletResponse</span><span class="w"> </span><span class="n">response</span><span class="p">,</span><span class="w"> </span><span class="o">@</span><span class="n">RequestBody</span><span class="p">(</span><span class="n">required</span><span class="o">=</span><span class="k">true</span><span class="p">)</span><span class="w"> </span><span class="o">@</span><span class="n">Validated</span><span class="w"> </span><span class="n">GetPage4Student</span><span class="w"> </span><span class="n">p</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-129" name="__codelineno-17-129"></a><span class="w">        </span><span class="k">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="w"> </span><span class="n">params</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="k">Object</span><span class="o">&gt;</span><span class="p">();</span>
<a id="__codelineno-17-130" name="__codelineno-17-130"></a><span class="w">        </span><span class="n">params</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="ss">&quot;id&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">getId</span><span class="p">());</span>
<a id="__codelineno-17-131" name="__codelineno-17-131"></a><span class="w">        </span><span class="k">Result</span><span class="o">&lt;</span><span class="nb">Integer</span><span class="o">&gt;</span><span class="w"> </span><span class="n">oc_size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="k">size</span><span class="p">(</span><span class="n">params</span><span class="p">);</span>
<a id="__codelineno-17-132" name="__codelineno-17-132"></a><span class="w">        </span><span class="n">String</span><span class="w"> </span><span class="n">title</span><span class="o">=</span><span class="ss">&quot;学生表&quot;</span><span class="p">;</span>
<a id="__codelineno-17-133" name="__codelineno-17-133"></a><span class="w">        </span><span class="n">OutputStream</span><span class="w"> </span><span class="n">outputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">null</span><span class="p">;</span>
<a id="__codelineno-17-134" name="__codelineno-17-134"></a><span class="w">        </span><span class="k">if</span><span class="p">(</span><span class="n">oc_size</span><span class="p">.</span><span class="n">getCode</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="err">{</span><span class="w">     </span>
<a id="__codelineno-17-135" name="__codelineno-17-135"></a><span class="w">            </span><span class="k">Result</span><span class="o">&lt;</span><span class="n">List</span><span class="o">&lt;</span><span class="n">Student</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">oc_getPage</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">studentService</span><span class="p">.</span><span class="n">getPage</span><span class="p">(</span><span class="n">params</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2000</span><span class="p">);</span>
<a id="__codelineno-17-136" name="__codelineno-17-136"></a><span class="w">            </span><span class="k">if</span><span class="p">(</span><span class="n">oc_getPage</span><span class="p">.</span><span class="n">getCode</span><span class="p">()</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-137" name="__codelineno-17-137"></a><span class="w">        </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-138" name="__codelineno-17-138"></a><span class="w">          </span><span class="n">outputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">response</span><span class="p">.</span><span class="n">getOutputStream</span><span class="p">();</span>
<a id="__codelineno-17-139" name="__codelineno-17-139"></a><span class="w">          </span><span class="n">response</span><span class="p">.</span><span class="n">setContentType</span><span class="p">(</span><span class="ss">&quot;application/vnd.ms-excel;charset=utf-8&quot;</span><span class="p">);</span>
<a id="__codelineno-17-140" name="__codelineno-17-140"></a><span class="w">          </span><span class="n">String</span><span class="w"> </span><span class="n">fileName</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">URLEncoder</span><span class="p">.</span><span class="n">encode</span><span class="p">(</span><span class="n">title</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="ss">&quot;.xls&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;UTF-8&quot;</span><span class="p">);</span>
<a id="__codelineno-17-141" name="__codelineno-17-141"></a><span class="w">          </span><span class="n">response</span><span class="p">.</span><span class="n">setHeader</span><span class="p">(</span><span class="ss">&quot;Content-disposition&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;attachment;filename=&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">fileName</span><span class="p">);</span>
<a id="__codelineno-17-142" name="__codelineno-17-142"></a><span class="w">          </span><span class="n">response</span><span class="p">.</span><span class="n">flushBuffer</span><span class="p">();</span>
<a id="__codelineno-17-143" name="__codelineno-17-143"></a><span class="w">          </span><span class="n">studentService</span><span class="p">.</span><span class="n">export2XLS</span><span class="p">(</span><span class="n">oc_getPage</span><span class="p">.</span><span class="n">getData</span><span class="p">(),</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">title</span><span class="p">,</span><span class="w"> </span><span class="n">outputStream</span><span class="p">);</span>
<a id="__codelineno-17-144" name="__codelineno-17-144"></a><span class="w">          </span><span class="n">outputStream</span><span class="p">.</span><span class="n">flush</span><span class="p">();</span>
<a id="__codelineno-17-145" name="__codelineno-17-145"></a><span class="w">          </span><span class="n">outputStream</span><span class="p">.</span><span class="k">close</span><span class="p">();</span>
<a id="__codelineno-17-146" name="__codelineno-17-146"></a><span class="w">        </span><span class="err">}</span><span class="w"> </span><span class="n">catch</span><span class="w"> </span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-147" name="__codelineno-17-147"></a><span class="w">          </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="ss">&quot;导出Excel异常&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">);</span>
<a id="__codelineno-17-148" name="__codelineno-17-148"></a><span class="w">        </span><span class="err">}</span><span class="n">finally</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-149" name="__codelineno-17-149"></a><span class="w">          </span><span class="n">try</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-150" name="__codelineno-17-150"></a><span class="w">            </span><span class="k">if</span><span class="p">(</span><span class="n">outputStream</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="k">null</span><span class="p">)</span><span class="err">{</span>
<a id="__codelineno-17-151" name="__codelineno-17-151"></a><span class="w">              </span><span class="n">outputStream</span><span class="p">.</span><span class="k">close</span><span class="p">();</span>
<a id="__codelineno-17-152" name="__codelineno-17-152"></a><span class="w">            </span><span class="err">}</span>
<a id="__codelineno-17-153" name="__codelineno-17-153"></a><span class="w">          </span><span class="err">}</span><span class="w"> </span><span class="n">catch</span><span class="w"> </span><span class="p">(</span><span class="k">Exception</span><span class="w"> </span><span class="n">e1</span><span class="p">)</span><span class="w"> </span><span class="err">{</span>
<a id="__codelineno-17-154" name="__codelineno-17-154"></a><span class="w">            </span><span class="n">log</span><span class="p">.</span><span class="n">error</span><span class="p">(</span><span class="ss">&quot;导出Excel关闭异常&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">e1</span><span class="p">);</span>
<a id="__codelineno-17-155" name="__codelineno-17-155"></a><span class="w">          </span><span class="err">}</span>
<a id="__codelineno-17-156" name="__codelineno-17-156"></a><span class="w">        </span><span class="err">}</span>
<a id="__codelineno-17-157" name="__codelineno-17-157"></a><span class="w">            </span><span class="err">}</span>
<a id="__codelineno-17-158" name="__codelineno-17-158"></a><span class="w">        </span><span class="err">}</span>
<a id="__codelineno-17-159" name="__codelineno-17-159"></a><span class="w">    </span><span class="err">}</span>
<a id="__codelineno-17-160" name="__codelineno-17-160"></a><span class="err">}</span>
</code></pre></div></td></tr></table></div>
</details>
</li>
</ol>
<h3 id="_3">测试</h3>
<ol>
<li>
<p>在Spring Boot Dashbord启动Stu工程</p>
</li>
<li>
<p>使用<strong>REST Client</strong>编写学生表CRUD测试代码，参考代码如下：</p>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-18-1"> 1</a></span>
<span class="normal"><a href="#__codelineno-18-2"> 2</a></span>
<span class="normal"><a href="#__codelineno-18-3"> 3</a></span>
<span class="normal"><a href="#__codelineno-18-4"> 4</a></span>
<span class="normal"><a href="#__codelineno-18-5"> 5</a></span>
<span class="normal"><a href="#__codelineno-18-6"> 6</a></span>
<span class="normal"><a href="#__codelineno-18-7"> 7</a></span>
<span class="normal"><a href="#__codelineno-18-8"> 8</a></span>
<span class="normal"><a href="#__codelineno-18-9"> 9</a></span>
<span class="normal"><a href="#__codelineno-18-10">10</a></span>
<span class="normal"><a href="#__codelineno-18-11">11</a></span>
<span class="normal"><a href="#__codelineno-18-12">12</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1"></a><span class="err">###</span>
<a id="__codelineno-18-2" name="__codelineno-18-2"></a><span class="nf">POST</span> <span class="nn">http://localhost:8080/Stu/demo/Student/add</span> <span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span>
<a id="__codelineno-18-3" name="__codelineno-18-3"></a><span class="na">content-type</span><span class="o">:</span> <span class="l">application/json</span>
<a id="__codelineno-18-4" name="__codelineno-18-4"></a>
<a id="__codelineno-18-5" name="__codelineno-18-5"></a><span class="p">{</span>
<a id="__codelineno-18-6" name="__codelineno-18-6"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-18-7" name="__codelineno-18-7"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-18-8" name="__codelineno-18-8"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-18-9" name="__codelineno-18-9"></a><span class="w">  </span><span class="nt">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-18-10" name="__codelineno-18-10"></a><span class="w">  </span><span class="nt">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">104</span><span class="p">,</span>
<a id="__codelineno-18-11" name="__codelineno-18-11"></a><span class="w">  </span><span class="nt">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X105&quot;</span>
<a id="__codelineno-18-12" name="__codelineno-18-12"></a><span class="p">}</span>
</code></pre></div></td></tr></table></div>
<details class="tip">
<summary>StudentController.java</summary>
<div class="highlight"><table class="highlighttable"><tr><th colspan="2" class="filename"><span class="filename">Stu/api_test.http</span></th></tr><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-19-1">  1</a></span>
<span class="normal"><a href="#__codelineno-19-2">  2</a></span>
<span class="normal"><a href="#__codelineno-19-3">  3</a></span>
<span class="normal"><a href="#__codelineno-19-4">  4</a></span>
<span class="normal"><a href="#__codelineno-19-5">  5</a></span>
<span class="normal"><a href="#__codelineno-19-6">  6</a></span>
<span class="normal"><a href="#__codelineno-19-7">  7</a></span>
<span class="normal"><a href="#__codelineno-19-8">  8</a></span>
<span class="normal"><a href="#__codelineno-19-9">  9</a></span>
<span class="normal"><a href="#__codelineno-19-10"> 10</a></span>
<span class="normal"><a href="#__codelineno-19-11"> 11</a></span>
<span class="normal"><a href="#__codelineno-19-12"> 12</a></span>
<span class="normal"><a href="#__codelineno-19-13"> 13</a></span>
<span class="normal"><a href="#__codelineno-19-14"> 14</a></span>
<span class="normal"><a href="#__codelineno-19-15"> 15</a></span>
<span class="normal"><a href="#__codelineno-19-16"> 16</a></span>
<span class="normal"><a href="#__codelineno-19-17"> 17</a></span>
<span class="normal"><a href="#__codelineno-19-18"> 18</a></span>
<span class="normal"><a href="#__codelineno-19-19"> 19</a></span>
<span class="normal"><a href="#__codelineno-19-20"> 20</a></span>
<span class="normal"><a href="#__codelineno-19-21"> 21</a></span>
<span class="normal"><a href="#__codelineno-19-22"> 22</a></span>
<span class="normal"><a href="#__codelineno-19-23"> 23</a></span>
<span class="normal"><a href="#__codelineno-19-24"> 24</a></span>
<span class="normal"><a href="#__codelineno-19-25"> 25</a></span>
<span class="normal"><a href="#__codelineno-19-26"> 26</a></span>
<span class="normal"><a href="#__codelineno-19-27"> 27</a></span>
<span class="normal"><a href="#__codelineno-19-28"> 28</a></span>
<span class="normal"><a href="#__codelineno-19-29"> 29</a></span>
<span class="normal"><a href="#__codelineno-19-30"> 30</a></span>
<span class="normal"><a href="#__codelineno-19-31"> 31</a></span>
<span class="normal"><a href="#__codelineno-19-32"> 32</a></span>
<span class="normal"><a href="#__codelineno-19-33"> 33</a></span>
<span class="normal"><a href="#__codelineno-19-34"> 34</a></span>
<span class="normal"><a href="#__codelineno-19-35"> 35</a></span>
<span class="normal"><a href="#__codelineno-19-36"> 36</a></span>
<span class="normal"><a href="#__codelineno-19-37"> 37</a></span>
<span class="normal"><a href="#__codelineno-19-38"> 38</a></span>
<span class="normal"><a href="#__codelineno-19-39"> 39</a></span>
<span class="normal"><a href="#__codelineno-19-40"> 40</a></span>
<span class="normal"><a href="#__codelineno-19-41"> 41</a></span>
<span class="normal"><a href="#__codelineno-19-42"> 42</a></span>
<span class="normal"><a href="#__codelineno-19-43"> 43</a></span>
<span class="normal"><a href="#__codelineno-19-44"> 44</a></span>
<span class="normal"><a href="#__codelineno-19-45"> 45</a></span>
<span class="normal"><a href="#__codelineno-19-46"> 46</a></span>
<span class="normal"><a href="#__codelineno-19-47"> 47</a></span>
<span class="normal"><a href="#__codelineno-19-48"> 48</a></span>
<span class="normal"><a href="#__codelineno-19-49"> 49</a></span>
<span class="normal"><a href="#__codelineno-19-50"> 50</a></span>
<span class="normal"><a href="#__codelineno-19-51"> 51</a></span>
<span class="normal"><a href="#__codelineno-19-52"> 52</a></span>
<span class="normal"><a href="#__codelineno-19-53"> 53</a></span>
<span class="normal"><a href="#__codelineno-19-54"> 54</a></span>
<span class="normal"><a href="#__codelineno-19-55"> 55</a></span>
<span class="normal"><a href="#__codelineno-19-56"> 56</a></span>
<span class="normal"><a href="#__codelineno-19-57"> 57</a></span>
<span class="normal"><a href="#__codelineno-19-58"> 58</a></span>
<span class="normal"><a href="#__codelineno-19-59"> 59</a></span>
<span class="normal"><a href="#__codelineno-19-60"> 60</a></span>
<span class="normal"><a href="#__codelineno-19-61"> 61</a></span>
<span class="normal"><a href="#__codelineno-19-62"> 62</a></span>
<span class="normal"><a href="#__codelineno-19-63"> 63</a></span>
<span class="normal"><a href="#__codelineno-19-64"> 64</a></span>
<span class="normal"><a href="#__codelineno-19-65"> 65</a></span>
<span class="normal"><a href="#__codelineno-19-66"> 66</a></span>
<span class="normal"><a href="#__codelineno-19-67"> 67</a></span>
<span class="normal"><a href="#__codelineno-19-68"> 68</a></span>
<span class="normal"><a href="#__codelineno-19-69"> 69</a></span>
<span class="normal"><a href="#__codelineno-19-70"> 70</a></span>
<span class="normal"><a href="#__codelineno-19-71"> 71</a></span>
<span class="normal"><a href="#__codelineno-19-72"> 72</a></span>
<span class="normal"><a href="#__codelineno-19-73"> 73</a></span>
<span class="normal"><a href="#__codelineno-19-74"> 74</a></span>
<span class="normal"><a href="#__codelineno-19-75"> 75</a></span>
<span class="normal"><a href="#__codelineno-19-76"> 76</a></span>
<span class="normal"><a href="#__codelineno-19-77"> 77</a></span>
<span class="normal"><a href="#__codelineno-19-78"> 78</a></span>
<span class="normal"><a href="#__codelineno-19-79"> 79</a></span>
<span class="normal"><a href="#__codelineno-19-80"> 80</a></span>
<span class="normal"><a href="#__codelineno-19-81"> 81</a></span>
<span class="normal"><a href="#__codelineno-19-82"> 82</a></span>
<span class="normal"><a href="#__codelineno-19-83"> 83</a></span>
<span class="normal"><a href="#__codelineno-19-84"> 84</a></span>
<span class="normal"><a href="#__codelineno-19-85"> 85</a></span>
<span class="normal"><a href="#__codelineno-19-86"> 86</a></span>
<span class="normal"><a href="#__codelineno-19-87"> 87</a></span>
<span class="normal"><a href="#__codelineno-19-88"> 88</a></span>
<span class="normal"><a href="#__codelineno-19-89"> 89</a></span>
<span class="normal"><a href="#__codelineno-19-90"> 90</a></span>
<span class="normal"><a href="#__codelineno-19-91"> 91</a></span>
<span class="normal"><a href="#__codelineno-19-92"> 92</a></span>
<span class="normal"><a href="#__codelineno-19-93"> 93</a></span>
<span class="normal"><a href="#__codelineno-19-94"> 94</a></span>
<span class="normal"><a href="#__codelineno-19-95"> 95</a></span>
<span class="normal"><a href="#__codelineno-19-96"> 96</a></span>
<span class="normal"><a href="#__codelineno-19-97"> 97</a></span>
<span class="normal"><a href="#__codelineno-19-98"> 98</a></span>
<span class="normal"><a href="#__codelineno-19-99"> 99</a></span>
<span class="normal"><a href="#__codelineno-19-100">100</a></span>
<span class="normal"><a href="#__codelineno-19-101">101</a></span>
<span class="normal"><a href="#__codelineno-19-102">102</a></span>
<span class="normal"><a href="#__codelineno-19-103">103</a></span>
<span class="normal"><a href="#__codelineno-19-104">104</a></span>
<span class="normal"><a href="#__codelineno-19-105">105</a></span>
<span class="normal"><a href="#__codelineno-19-106">106</a></span>
<span class="normal"><a href="#__codelineno-19-107">107</a></span>
<span class="normal"><a href="#__codelineno-19-108">108</a></span>
<span class="normal"><a href="#__codelineno-19-109">109</a></span>
<span class="normal"><a href="#__codelineno-19-110">110</a></span>
<span class="normal"><a href="#__codelineno-19-111">111</a></span>
<span class="normal"><a href="#__codelineno-19-112">112</a></span>
<span class="normal"><a href="#__codelineno-19-113">113</a></span>
<span class="normal"><a href="#__codelineno-19-114">114</a></span>
<span class="normal"><a href="#__codelineno-19-115">115</a></span>
<span class="normal"><a href="#__codelineno-19-116">116</a></span>
<span class="normal"><a href="#__codelineno-19-117">117</a></span>
<span class="normal"><a href="#__codelineno-19-118">118</a></span>
<span class="normal"><a href="#__codelineno-19-119">119</a></span>
<span class="normal"><a href="#__codelineno-19-120">120</a></span>
<span class="normal"><a href="#__codelineno-19-121">121</a></span>
<span class="normal"><a href="#__codelineno-19-122">122</a></span>
<span class="normal"><a href="#__codelineno-19-123">123</a></span>
<span class="normal"><a href="#__codelineno-19-124">124</a></span>
<span class="normal"><a href="#__codelineno-19-125">125</a></span>
<span class="normal"><a href="#__codelineno-19-126">126</a></span>
<span class="normal"><a href="#__codelineno-19-127">127</a></span>
<span class="normal"><a href="#__codelineno-19-128">128</a></span>
<span class="normal"><a href="#__codelineno-19-129">129</a></span>
<span class="normal"><a href="#__codelineno-19-130">130</a></span>
<span class="normal"><a href="#__codelineno-19-131">131</a></span>
<span class="normal"><a href="#__codelineno-19-132">132</a></span>
<span class="normal"><a href="#__codelineno-19-133">133</a></span>
<span class="normal"><a href="#__codelineno-19-134">134</a></span>
<span class="normal"><a href="#__codelineno-19-135">135</a></span>
<span class="normal"><a href="#__codelineno-19-136">136</a></span>
<span class="normal"><a href="#__codelineno-19-137">137</a></span>
<span class="normal"><a href="#__codelineno-19-138">138</a></span>
<span class="normal"><a href="#__codelineno-19-139">139</a></span>
<span class="normal"><a href="#__codelineno-19-140">140</a></span>
<span class="normal"><a href="#__codelineno-19-141">141</a></span>
<span class="normal"><a href="#__codelineno-19-142">142</a></span>
<span class="normal"><a href="#__codelineno-19-143">143</a></span></pre></div></td><td class="code"><div><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:add]</span>
<a id="__codelineno-19-2" name="__codelineno-19-2"></a><span class="o">###</span>
<a id="__codelineno-19-3" name="__codelineno-19-3"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Student</span><span class="o">/</span><span class="k">add</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-4" name="__codelineno-19-4"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-5" name="__codelineno-19-5"></a>
<a id="__codelineno-19-6" name="__codelineno-19-6"></a><span class="err">{</span>
<a id="__codelineno-19-7" name="__codelineno-19-7"></a><span class="w">  </span><span class="ss">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-19-8" name="__codelineno-19-8"></a><span class="w">  </span><span class="ss">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-19-9" name="__codelineno-19-9"></a><span class="w">  </span><span class="ss">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-19-10" name="__codelineno-19-10"></a><span class="w">  </span><span class="ss">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-19-11" name="__codelineno-19-11"></a><span class="w">  </span><span class="ss">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">104</span><span class="p">,</span>
<a id="__codelineno-19-12" name="__codelineno-19-12"></a><span class="w">  </span><span class="ss">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X105&quot;</span>
<a id="__codelineno-19-13" name="__codelineno-19-13"></a><span class="err">}</span>
<a id="__codelineno-19-14" name="__codelineno-19-14"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:add]</span>
<a id="__codelineno-19-15" name="__codelineno-19-15"></a>
<a id="__codelineno-19-16" name="__codelineno-19-16"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:delete]</span>
<a id="__codelineno-19-17" name="__codelineno-19-17"></a><span class="o">###</span>
<a id="__codelineno-19-18" name="__codelineno-19-18"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Student</span><span class="o">/</span><span class="k">delete</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-19" name="__codelineno-19-19"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-20" name="__codelineno-19-20"></a>
<a id="__codelineno-19-21" name="__codelineno-19-21"></a><span class="p">[</span><span class="ss">&quot;1&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;2&quot;</span><span class="p">]</span>
<a id="__codelineno-19-22" name="__codelineno-19-22"></a>
<a id="__codelineno-19-23" name="__codelineno-19-23"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:delete]</span>
<a id="__codelineno-19-24" name="__codelineno-19-24"></a>
<a id="__codelineno-19-25" name="__codelineno-19-25"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:update]</span>
<a id="__codelineno-19-26" name="__codelineno-19-26"></a><span class="o">###</span>
<a id="__codelineno-19-27" name="__codelineno-19-27"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Student</span><span class="o">/</span><span class="k">update</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-28" name="__codelineno-19-28"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-29" name="__codelineno-19-29"></a>
<a id="__codelineno-19-30" name="__codelineno-19-30"></a><span class="err">{</span>
<a id="__codelineno-19-31" name="__codelineno-19-31"></a><span class="w">  </span><span class="ss">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-19-32" name="__codelineno-19-32"></a><span class="w">  </span><span class="ss">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-19-33" name="__codelineno-19-33"></a><span class="w">  </span><span class="ss">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-19-34" name="__codelineno-19-34"></a><span class="w">  </span><span class="ss">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-19-35" name="__codelineno-19-35"></a><span class="w">  </span><span class="ss">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">104</span><span class="p">,</span>
<a id="__codelineno-19-36" name="__codelineno-19-36"></a><span class="w">  </span><span class="ss">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X105&quot;</span>
<a id="__codelineno-19-37" name="__codelineno-19-37"></a><span class="err">}</span>
<a id="__codelineno-19-38" name="__codelineno-19-38"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:update]</span>
<a id="__codelineno-19-39" name="__codelineno-19-39"></a>
<a id="__codelineno-19-40" name="__codelineno-19-40"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:getPage]</span>
<a id="__codelineno-19-41" name="__codelineno-19-41"></a><span class="o">###</span>
<a id="__codelineno-19-42" name="__codelineno-19-42"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Student</span><span class="o">/</span><span class="n">getPage</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-43" name="__codelineno-19-43"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-44" name="__codelineno-19-44"></a>
<a id="__codelineno-19-45" name="__codelineno-19-45"></a><span class="err">{</span>
<a id="__codelineno-19-46" name="__codelineno-19-46"></a><span class="w">    </span><span class="ss">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<a id="__codelineno-19-47" name="__codelineno-19-47"></a><span class="w">    </span><span class="ss">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span>
<a id="__codelineno-19-48" name="__codelineno-19-48"></a><span class="err">}</span>
<a id="__codelineno-19-49" name="__codelineno-19-49"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:getPage]</span>
<a id="__codelineno-19-50" name="__codelineno-19-50"></a>
<a id="__codelineno-19-51" name="__codelineno-19-51"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:add]</span>
<a id="__codelineno-19-52" name="__codelineno-19-52"></a><span class="o">###</span>
<a id="__codelineno-19-53" name="__codelineno-19-53"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Course</span><span class="o">/</span><span class="k">add</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-54" name="__codelineno-19-54"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-55" name="__codelineno-19-55"></a>
<a id="__codelineno-19-56" name="__codelineno-19-56"></a><span class="err">{</span>
<a id="__codelineno-19-57" name="__codelineno-19-57"></a><span class="w">  </span><span class="ss">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-19-58" name="__codelineno-19-58"></a><span class="w">  </span><span class="ss">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-19-59" name="__codelineno-19-59"></a><span class="w">  </span><span class="ss">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-19-60" name="__codelineno-19-60"></a><span class="w">  </span><span class="ss">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-19-61" name="__codelineno-19-61"></a><span class="w">  </span><span class="ss">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">.</span><span class="mi">3</span>
<a id="__codelineno-19-62" name="__codelineno-19-62"></a><span class="err">}</span>
<a id="__codelineno-19-63" name="__codelineno-19-63"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:add]</span>
<a id="__codelineno-19-64" name="__codelineno-19-64"></a>
<a id="__codelineno-19-65" name="__codelineno-19-65"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:delete]</span>
<a id="__codelineno-19-66" name="__codelineno-19-66"></a><span class="o">###</span>
<a id="__codelineno-19-67" name="__codelineno-19-67"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Course</span><span class="o">/</span><span class="k">delete</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-68" name="__codelineno-19-68"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-69" name="__codelineno-19-69"></a>
<a id="__codelineno-19-70" name="__codelineno-19-70"></a><span class="p">[</span><span class="ss">&quot;1&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;2&quot;</span><span class="p">]</span>
<a id="__codelineno-19-71" name="__codelineno-19-71"></a>
<a id="__codelineno-19-72" name="__codelineno-19-72"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:delete]</span>
<a id="__codelineno-19-73" name="__codelineno-19-73"></a>
<a id="__codelineno-19-74" name="__codelineno-19-74"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:update]</span>
<a id="__codelineno-19-75" name="__codelineno-19-75"></a><span class="o">###</span>
<a id="__codelineno-19-76" name="__codelineno-19-76"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Course</span><span class="o">/</span><span class="k">update</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-77" name="__codelineno-19-77"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-78" name="__codelineno-19-78"></a>
<a id="__codelineno-19-79" name="__codelineno-19-79"></a><span class="err">{</span>
<a id="__codelineno-19-80" name="__codelineno-19-80"></a><span class="w">  </span><span class="ss">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-19-81" name="__codelineno-19-81"></a><span class="w">  </span><span class="ss">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-19-82" name="__codelineno-19-82"></a><span class="w">  </span><span class="ss">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-19-83" name="__codelineno-19-83"></a><span class="w">  </span><span class="ss">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-19-84" name="__codelineno-19-84"></a><span class="w">  </span><span class="ss">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">.</span><span class="mi">3</span>
<a id="__codelineno-19-85" name="__codelineno-19-85"></a><span class="err">}</span>
<a id="__codelineno-19-86" name="__codelineno-19-86"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:update]</span>
<a id="__codelineno-19-87" name="__codelineno-19-87"></a>
<a id="__codelineno-19-88" name="__codelineno-19-88"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:getPage]</span>
<a id="__codelineno-19-89" name="__codelineno-19-89"></a><span class="o">###</span>
<a id="__codelineno-19-90" name="__codelineno-19-90"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">Course</span><span class="o">/</span><span class="n">getPage</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-91" name="__codelineno-19-91"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-92" name="__codelineno-19-92"></a>
<a id="__codelineno-19-93" name="__codelineno-19-93"></a><span class="err">{</span>
<a id="__codelineno-19-94" name="__codelineno-19-94"></a><span class="w">    </span><span class="ss">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<a id="__codelineno-19-95" name="__codelineno-19-95"></a><span class="w">    </span><span class="ss">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span>
<a id="__codelineno-19-96" name="__codelineno-19-96"></a><span class="err">}</span>
<a id="__codelineno-19-97" name="__codelineno-19-97"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:getPage]</span>
<a id="__codelineno-19-98" name="__codelineno-19-98"></a>
<a id="__codelineno-19-99" name="__codelineno-19-99"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:add]</span>
<a id="__codelineno-19-100" name="__codelineno-19-100"></a><span class="o">###</span>
<a id="__codelineno-19-101" name="__codelineno-19-101"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">StuCourse</span><span class="o">/</span><span class="k">add</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-102" name="__codelineno-19-102"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-103" name="__codelineno-19-103"></a>
<a id="__codelineno-19-104" name="__codelineno-19-104"></a><span class="err">{</span>
<a id="__codelineno-19-105" name="__codelineno-19-105"></a><span class="w">  </span><span class="ss">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-19-106" name="__codelineno-19-106"></a><span class="w">  </span><span class="ss">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-19-107" name="__codelineno-19-107"></a><span class="w">  </span><span class="ss">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-19-108" name="__codelineno-19-108"></a><span class="w">  </span><span class="ss">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">.</span><span class="mi">3</span>
<a id="__codelineno-19-109" name="__codelineno-19-109"></a><span class="err">}</span>
<a id="__codelineno-19-110" name="__codelineno-19-110"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:add]</span>
<a id="__codelineno-19-111" name="__codelineno-19-111"></a>
<a id="__codelineno-19-112" name="__codelineno-19-112"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:delete]</span>
<a id="__codelineno-19-113" name="__codelineno-19-113"></a><span class="o">###</span>
<a id="__codelineno-19-114" name="__codelineno-19-114"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">StuCourse</span><span class="o">/</span><span class="k">delete</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-115" name="__codelineno-19-115"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-116" name="__codelineno-19-116"></a>
<a id="__codelineno-19-117" name="__codelineno-19-117"></a><span class="p">[</span><span class="ss">&quot;1&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">&quot;2&quot;</span><span class="p">]</span>
<a id="__codelineno-19-118" name="__codelineno-19-118"></a>
<a id="__codelineno-19-119" name="__codelineno-19-119"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:delete]</span>
<a id="__codelineno-19-120" name="__codelineno-19-120"></a>
<a id="__codelineno-19-121" name="__codelineno-19-121"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:update]</span>
<a id="__codelineno-19-122" name="__codelineno-19-122"></a><span class="o">###</span>
<a id="__codelineno-19-123" name="__codelineno-19-123"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">StuCourse</span><span class="o">/</span><span class="k">update</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-124" name="__codelineno-19-124"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-125" name="__codelineno-19-125"></a>
<a id="__codelineno-19-126" name="__codelineno-19-126"></a><span class="err">{</span>
<a id="__codelineno-19-127" name="__codelineno-19-127"></a><span class="w">  </span><span class="ss">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-19-128" name="__codelineno-19-128"></a><span class="w">  </span><span class="ss">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-19-129" name="__codelineno-19-129"></a><span class="w">  </span><span class="ss">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="ss">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-19-130" name="__codelineno-19-130"></a><span class="w">  </span><span class="ss">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">.</span><span class="mi">3</span>
<a id="__codelineno-19-131" name="__codelineno-19-131"></a><span class="err">}</span>
<a id="__codelineno-19-132" name="__codelineno-19-132"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:update]</span>
<a id="__codelineno-19-133" name="__codelineno-19-133"></a>
<a id="__codelineno-19-134" name="__codelineno-19-134"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [start:getPage]</span>
<a id="__codelineno-19-135" name="__codelineno-19-135"></a><span class="o">###</span>
<a id="__codelineno-19-136" name="__codelineno-19-136"></a><span class="n">POST</span><span class="w"> </span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">Stu</span><span class="o">/</span><span class="n">demo</span><span class="o">/</span><span class="n">StuCourse</span><span class="o">/</span><span class="n">getPage</span><span class="w"> </span><span class="n">HTTP</span><span class="o">/</span><span class="mi">1</span><span class="p">.</span><span class="mi">1</span>
<a id="__codelineno-19-137" name="__codelineno-19-137"></a><span class="n">content</span><span class="o">-</span><span class="k">type</span><span class="p">:</span><span class="w"> </span><span class="n">application</span><span class="o">/</span><span class="n">json</span>
<a id="__codelineno-19-138" name="__codelineno-19-138"></a>
<a id="__codelineno-19-139" name="__codelineno-19-139"></a><span class="err">{</span>
<a id="__codelineno-19-140" name="__codelineno-19-140"></a><span class="w">    </span><span class="ss">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<a id="__codelineno-19-141" name="__codelineno-19-141"></a><span class="w">    </span><span class="ss">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span>
<a id="__codelineno-19-142" name="__codelineno-19-142"></a><span class="err">}</span>
<a id="__codelineno-19-143" name="__codelineno-19-143"></a><span class="o">#</span><span class="w"> </span><span class="c1">--8&lt;-- [end:getPage]</span>
</code></pre></div></td></tr></table></div>
</details>
</li>
<li>
<p>分别点击各<strong>REST Client</strong>链接，检查返回结果是否正确</p>
</li>
</ol>
<p><code>Stu/api.md</code>中包含各Web Api的使用说明，可据此检查返回结果</p>
<details class="tip">
<summary>Web Api说明(Stu/api.md)</summary>
<h2 id="_4">学生表</h2>
<h3 id="_5">学生表增</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Student/add">http://my_host:8080/Stu/demo/Student/add</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-20-1" name="__codelineno-20-1" href="#__codelineno-20-1"></a><span class="p">{</span>
<a id="__codelineno-20-2" name="__codelineno-20-2" href="#__codelineno-20-2"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//Id</span>
<a id="__codelineno-20-3" name="__codelineno-20-3" href="#__codelineno-20-3"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//学号</span>
<a id="__codelineno-20-4" name="__codelineno-20-4" href="#__codelineno-20-4"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//姓名</span>
<a id="__codelineno-20-5" name="__codelineno-20-5" href="#__codelineno-20-5"></a><span class="w">  </span><span class="nt">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//性别</span>
<a id="__codelineno-20-6" name="__codelineno-20-6" href="#__codelineno-20-6"></a><span class="w">  </span><span class="nt">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="p">,</span><span class="w">  </span><span class="c1">//年龄</span>
<a id="__codelineno-20-7" name="__codelineno-20-7" href="#__codelineno-20-7"></a><span class="w">  </span><span class="nt">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="w">  </span><span class="c1">//所在系</span>
<a id="__codelineno-20-8" name="__codelineno-20-8" href="#__codelineno-20-8"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-21-1" name="__codelineno-21-1" href="#__codelineno-21-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Student/add HTTP/1.1</span>
<a id="__codelineno-21-2" name="__codelineno-21-2" href="#__codelineno-21-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-21-3" name="__codelineno-21-3" href="#__codelineno-21-3"></a>
<a id="__codelineno-21-4" name="__codelineno-21-4" href="#__codelineno-21-4"></a><span class="p">{</span>
<a id="__codelineno-21-5" name="__codelineno-21-5" href="#__codelineno-21-5"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-21-6" name="__codelineno-21-6" href="#__codelineno-21-6"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-21-7" name="__codelineno-21-7" href="#__codelineno-21-7"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-21-8" name="__codelineno-21-8" href="#__codelineno-21-8"></a><span class="w">  </span><span class="nt">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-21-9" name="__codelineno-21-9" href="#__codelineno-21-9"></a><span class="w">  </span><span class="nt">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">104</span><span class="p">,</span>
<a id="__codelineno-21-10" name="__codelineno-21-10" href="#__codelineno-21-10"></a><span class="w">  </span><span class="nt">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X105&quot;</span>
<a id="__codelineno-21-11" name="__codelineno-21-11" href="#__codelineno-21-11"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-22-1" name="__codelineno-22-1" href="#__codelineno-22-1"></a><span class="p">{</span>
<a id="__codelineno-22-2" name="__codelineno-22-2" href="#__codelineno-22-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-22-3" name="__codelineno-22-3" href="#__codelineno-22-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-22-4" name="__codelineno-22-4" href="#__codelineno-22-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-22-5" name="__codelineno-22-5" href="#__codelineno-22-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-22-6" name="__codelineno-22-6" href="#__codelineno-22-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-23-1" name="__codelineno-23-1" href="#__codelineno-23-1"></a><span class="p">{</span>
<a id="__codelineno-23-2" name="__codelineno-23-2" href="#__codelineno-23-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1001</span><span class="p">,</span>
<a id="__codelineno-23-3" name="__codelineno-23-3" href="#__codelineno-23-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;创建失败！&quot;</span><span class="p">,</span>
<a id="__codelineno-23-4" name="__codelineno-23-4" href="#__codelineno-23-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;[SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint failed (UNIQUE constraint failed: Student.no)&quot;</span><span class="p">,</span>
<a id="__codelineno-23-5" name="__codelineno-23-5" href="#__codelineno-23-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<a id="__codelineno-23-6" name="__codelineno-23-6" href="#__codelineno-23-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_6">学生表删</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Student/delete">http://my_host:8080/Stu/demo/Student/delete</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-24-1" name="__codelineno-24-1" href="#__codelineno-24-1"></a><span class="p">[</span><span class="s2">&quot;id1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;id2&quot;</span><span class="p">]</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-25-1" name="__codelineno-25-1" href="#__codelineno-25-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Student/delete HTTP/1.1</span>
<a id="__codelineno-25-2" name="__codelineno-25-2" href="#__codelineno-25-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-25-3" name="__codelineno-25-3" href="#__codelineno-25-3"></a>
<a id="__codelineno-25-4" name="__codelineno-25-4" href="#__codelineno-25-4"></a><span class="p">[</span><span class="s2">&quot;1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;2&quot;</span><span class="p">]</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-26-1" name="__codelineno-26-1" href="#__codelineno-26-1"></a><span class="p">{</span>
<a id="__codelineno-26-2" name="__codelineno-26-2" href="#__codelineno-26-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-26-3" name="__codelineno-26-3" href="#__codelineno-26-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-26-4" name="__codelineno-26-4" href="#__codelineno-26-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-26-5" name="__codelineno-26-5" href="#__codelineno-26-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-26-6" name="__codelineno-26-6" href="#__codelineno-26-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-27-1" name="__codelineno-27-1" href="#__codelineno-27-1"></a><span class="p">{</span>
<a id="__codelineno-27-2" name="__codelineno-27-2" href="#__codelineno-27-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-27-3" name="__codelineno-27-3" href="#__codelineno-27-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-27-4" name="__codelineno-27-4" href="#__codelineno-27-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-27-5" name="__codelineno-27-5" href="#__codelineno-27-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="c1">//影响行数为0</span>
<a id="__codelineno-27-6" name="__codelineno-27-6" href="#__codelineno-27-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_7">学生表改</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Student/update">http://my_host:8080/Stu/demo/Student/update</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-28-1" name="__codelineno-28-1" href="#__codelineno-28-1"></a><span class="p">{</span>
<a id="__codelineno-28-2" name="__codelineno-28-2" href="#__codelineno-28-2"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//Id</span>
<a id="__codelineno-28-3" name="__codelineno-28-3" href="#__codelineno-28-3"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//学号</span>
<a id="__codelineno-28-4" name="__codelineno-28-4" href="#__codelineno-28-4"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//姓名</span>
<a id="__codelineno-28-5" name="__codelineno-28-5" href="#__codelineno-28-5"></a><span class="w">  </span><span class="nt">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//性别</span>
<a id="__codelineno-28-6" name="__codelineno-28-6" href="#__codelineno-28-6"></a><span class="w">  </span><span class="nt">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="p">,</span><span class="w">  </span><span class="c1">//年龄</span>
<a id="__codelineno-28-7" name="__codelineno-28-7" href="#__codelineno-28-7"></a><span class="w">  </span><span class="nt">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="w">  </span><span class="c1">//所在系</span>
<a id="__codelineno-28-8" name="__codelineno-28-8" href="#__codelineno-28-8"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-29-1" name="__codelineno-29-1" href="#__codelineno-29-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Student/update HTTP/1.1</span>
<a id="__codelineno-29-2" name="__codelineno-29-2" href="#__codelineno-29-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-29-3" name="__codelineno-29-3" href="#__codelineno-29-3"></a>
<a id="__codelineno-29-4" name="__codelineno-29-4" href="#__codelineno-29-4"></a><span class="p">{</span>
<a id="__codelineno-29-5" name="__codelineno-29-5" href="#__codelineno-29-5"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-29-6" name="__codelineno-29-6" href="#__codelineno-29-6"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-29-7" name="__codelineno-29-7" href="#__codelineno-29-7"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-29-8" name="__codelineno-29-8" href="#__codelineno-29-8"></a><span class="w">  </span><span class="nt">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-29-9" name="__codelineno-29-9" href="#__codelineno-29-9"></a><span class="w">  </span><span class="nt">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">104</span><span class="p">,</span>
<a id="__codelineno-29-10" name="__codelineno-29-10" href="#__codelineno-29-10"></a><span class="w">  </span><span class="nt">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X105&quot;</span>
<a id="__codelineno-29-11" name="__codelineno-29-11" href="#__codelineno-29-11"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-30-1" name="__codelineno-30-1" href="#__codelineno-30-1"></a><span class="p">{</span>
<a id="__codelineno-30-2" name="__codelineno-30-2" href="#__codelineno-30-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-30-3" name="__codelineno-30-3" href="#__codelineno-30-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-30-4" name="__codelineno-30-4" href="#__codelineno-30-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-30-5" name="__codelineno-30-5" href="#__codelineno-30-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-30-6" name="__codelineno-30-6" href="#__codelineno-30-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-31-1" name="__codelineno-31-1" href="#__codelineno-31-1"></a><span class="p">{</span>
<a id="__codelineno-31-2" name="__codelineno-31-2" href="#__codelineno-31-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1001</span><span class="p">,</span>
<a id="__codelineno-31-3" name="__codelineno-31-3" href="#__codelineno-31-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;创建失败！&quot;</span><span class="p">,</span>
<a id="__codelineno-31-4" name="__codelineno-31-4" href="#__codelineno-31-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;[SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint failed (UNIQUE constraint failed: Student.no)&quot;</span><span class="p">,</span>
<a id="__codelineno-31-5" name="__codelineno-31-5" href="#__codelineno-31-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<a id="__codelineno-31-6" name="__codelineno-31-6" href="#__codelineno-31-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_8">学生表查</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Student/getPage">http://my_host:8080/Stu/demo/Student/getPage</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-32-1" name="__codelineno-32-1" href="#__codelineno-32-1"></a><span class="p">{</span>
<a id="__codelineno-32-2" name="__codelineno-32-2" href="#__codelineno-32-2"></a><span class="w">    </span><span class="nt">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="p">,</span><span class="w"> </span><span class="c1">//页码，从0开始</span>
<a id="__codelineno-32-3" name="__codelineno-32-3" href="#__codelineno-32-3"></a><span class="w">    </span><span class="nt">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="w"> </span><span class="c1">//页大小</span>
<a id="__codelineno-32-4" name="__codelineno-32-4" href="#__codelineno-32-4"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-33-1" name="__codelineno-33-1" href="#__codelineno-33-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Student/getPage HTTP/1.1</span>
<a id="__codelineno-33-2" name="__codelineno-33-2" href="#__codelineno-33-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-33-3" name="__codelineno-33-3" href="#__codelineno-33-3"></a>
<a id="__codelineno-33-4" name="__codelineno-33-4" href="#__codelineno-33-4"></a><span class="p">{</span>
<a id="__codelineno-33-5" name="__codelineno-33-5" href="#__codelineno-33-5"></a><span class="w">    </span><span class="nt">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<a id="__codelineno-33-6" name="__codelineno-33-6" href="#__codelineno-33-6"></a><span class="w">    </span><span class="nt">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span>
<a id="__codelineno-33-7" name="__codelineno-33-7" href="#__codelineno-33-7"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-34-1" name="__codelineno-34-1" href="#__codelineno-34-1"></a><span class="p">{</span>
<a id="__codelineno-34-2" name="__codelineno-34-2" href="#__codelineno-34-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-34-3" name="__codelineno-34-3" href="#__codelineno-34-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-34-4" name="__codelineno-34-4" href="#__codelineno-34-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-34-5" name="__codelineno-34-5" href="#__codelineno-34-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-34-6" name="__codelineno-34-6" href="#__codelineno-34-6"></a><span class="w">    </span><span class="nt">&quot;total&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span>
<a id="__codelineno-34-7" name="__codelineno-34-7" href="#__codelineno-34-7"></a><span class="w">    </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<a id="__codelineno-34-8" name="__codelineno-34-8" href="#__codelineno-34-8"></a><span class="w">      </span><span class="p">{</span>
<a id="__codelineno-34-9" name="__codelineno-34-9" href="#__codelineno-34-9"></a><span class="w">        </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-34-10" name="__codelineno-34-10" href="#__codelineno-34-10"></a><span class="w">        </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-34-11" name="__codelineno-34-11" href="#__codelineno-34-11"></a><span class="w">        </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-34-12" name="__codelineno-34-12" href="#__codelineno-34-12"></a><span class="w">        </span><span class="nt">&quot;gender&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-34-13" name="__codelineno-34-13" href="#__codelineno-34-13"></a><span class="w">        </span><span class="nt">&quot;age&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">104</span><span class="p">,</span>
<a id="__codelineno-34-14" name="__codelineno-34-14" href="#__codelineno-34-14"></a><span class="w">        </span><span class="nt">&quot;dept&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X105&quot;</span>
<a id="__codelineno-34-15" name="__codelineno-34-15" href="#__codelineno-34-15"></a><span class="w">      </span><span class="p">}</span>
<a id="__codelineno-34-16" name="__codelineno-34-16" href="#__codelineno-34-16"></a><span class="w">    </span><span class="p">]</span>
<a id="__codelineno-34-17" name="__codelineno-34-17" href="#__codelineno-34-17"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-34-18" name="__codelineno-34-18" href="#__codelineno-34-18"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-35-1" name="__codelineno-35-1" href="#__codelineno-35-1"></a><span class="p">{</span>
<a id="__codelineno-35-2" name="__codelineno-35-2" href="#__codelineno-35-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-35-3" name="__codelineno-35-3" href="#__codelineno-35-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-35-4" name="__codelineno-35-4" href="#__codelineno-35-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-35-5" name="__codelineno-35-5" href="#__codelineno-35-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-35-6" name="__codelineno-35-6" href="#__codelineno-35-6"></a><span class="w">    </span><span class="nt">&quot;total&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-35-7" name="__codelineno-35-7" href="#__codelineno-35-7"></a><span class="w">    </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span>
<a id="__codelineno-35-8" name="__codelineno-35-8" href="#__codelineno-35-8"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-35-9" name="__codelineno-35-9" href="#__codelineno-35-9"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h2 id="_9">课程表</h2>
<h3 id="_10">课程表增</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Course/add">http://my_host:8080/Stu/demo/Course/add</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-36-1" name="__codelineno-36-1" href="#__codelineno-36-1"></a><span class="p">{</span>
<a id="__codelineno-36-2" name="__codelineno-36-2" href="#__codelineno-36-2"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//Id</span>
<a id="__codelineno-36-3" name="__codelineno-36-3" href="#__codelineno-36-3"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//编号</span>
<a id="__codelineno-36-4" name="__codelineno-36-4" href="#__codelineno-36-4"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//课程名</span>
<a id="__codelineno-36-5" name="__codelineno-36-5" href="#__codelineno-36-5"></a><span class="w">  </span><span class="nt">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//先修课</span>
<a id="__codelineno-36-6" name="__codelineno-36-6" href="#__codelineno-36-6"></a><span class="w">  </span><span class="nt">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">Double</span><span class="w">  </span><span class="c1">//学分</span>
<a id="__codelineno-36-7" name="__codelineno-36-7" href="#__codelineno-36-7"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-37-1" name="__codelineno-37-1" href="#__codelineno-37-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Course/add HTTP/1.1</span>
<a id="__codelineno-37-2" name="__codelineno-37-2" href="#__codelineno-37-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-37-3" name="__codelineno-37-3" href="#__codelineno-37-3"></a>
<a id="__codelineno-37-4" name="__codelineno-37-4" href="#__codelineno-37-4"></a><span class="p">{</span>
<a id="__codelineno-37-5" name="__codelineno-37-5" href="#__codelineno-37-5"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-37-6" name="__codelineno-37-6" href="#__codelineno-37-6"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-37-7" name="__codelineno-37-7" href="#__codelineno-37-7"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-37-8" name="__codelineno-37-8" href="#__codelineno-37-8"></a><span class="w">  </span><span class="nt">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-37-9" name="__codelineno-37-9" href="#__codelineno-37-9"></a><span class="w">  </span><span class="nt">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="mf">3.3</span>
<a id="__codelineno-37-10" name="__codelineno-37-10" href="#__codelineno-37-10"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-38-1" name="__codelineno-38-1" href="#__codelineno-38-1"></a><span class="p">{</span>
<a id="__codelineno-38-2" name="__codelineno-38-2" href="#__codelineno-38-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-38-3" name="__codelineno-38-3" href="#__codelineno-38-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-38-4" name="__codelineno-38-4" href="#__codelineno-38-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-38-5" name="__codelineno-38-5" href="#__codelineno-38-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-38-6" name="__codelineno-38-6" href="#__codelineno-38-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-39-1" name="__codelineno-39-1" href="#__codelineno-39-1"></a><span class="p">{</span>
<a id="__codelineno-39-2" name="__codelineno-39-2" href="#__codelineno-39-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1001</span><span class="p">,</span>
<a id="__codelineno-39-3" name="__codelineno-39-3" href="#__codelineno-39-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;创建失败！&quot;</span><span class="p">,</span>
<a id="__codelineno-39-4" name="__codelineno-39-4" href="#__codelineno-39-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;[SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint failed (UNIQUE constraint failed: Student.no)&quot;</span><span class="p">,</span>
<a id="__codelineno-39-5" name="__codelineno-39-5" href="#__codelineno-39-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<a id="__codelineno-39-6" name="__codelineno-39-6" href="#__codelineno-39-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_11">课程表删</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Course/delete">http://my_host:8080/Stu/demo/Course/delete</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-40-1" name="__codelineno-40-1" href="#__codelineno-40-1"></a><span class="p">[</span><span class="s2">&quot;id1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;id2&quot;</span><span class="p">]</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-41-1" name="__codelineno-41-1" href="#__codelineno-41-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Course/delete HTTP/1.1</span>
<a id="__codelineno-41-2" name="__codelineno-41-2" href="#__codelineno-41-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-41-3" name="__codelineno-41-3" href="#__codelineno-41-3"></a>
<a id="__codelineno-41-4" name="__codelineno-41-4" href="#__codelineno-41-4"></a><span class="p">[</span><span class="s2">&quot;1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;2&quot;</span><span class="p">]</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-42-1" name="__codelineno-42-1" href="#__codelineno-42-1"></a><span class="p">{</span>
<a id="__codelineno-42-2" name="__codelineno-42-2" href="#__codelineno-42-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-42-3" name="__codelineno-42-3" href="#__codelineno-42-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-42-4" name="__codelineno-42-4" href="#__codelineno-42-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-42-5" name="__codelineno-42-5" href="#__codelineno-42-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-42-6" name="__codelineno-42-6" href="#__codelineno-42-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-43-1" name="__codelineno-43-1" href="#__codelineno-43-1"></a><span class="p">{</span>
<a id="__codelineno-43-2" name="__codelineno-43-2" href="#__codelineno-43-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-43-3" name="__codelineno-43-3" href="#__codelineno-43-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-43-4" name="__codelineno-43-4" href="#__codelineno-43-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-43-5" name="__codelineno-43-5" href="#__codelineno-43-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="c1">//影响行数为0</span>
<a id="__codelineno-43-6" name="__codelineno-43-6" href="#__codelineno-43-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_12">课程表改</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Course/update">http://my_host:8080/Stu/demo/Course/update</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-44-1" name="__codelineno-44-1" href="#__codelineno-44-1"></a><span class="p">{</span>
<a id="__codelineno-44-2" name="__codelineno-44-2" href="#__codelineno-44-2"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//Id</span>
<a id="__codelineno-44-3" name="__codelineno-44-3" href="#__codelineno-44-3"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//编号</span>
<a id="__codelineno-44-4" name="__codelineno-44-4" href="#__codelineno-44-4"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//课程名</span>
<a id="__codelineno-44-5" name="__codelineno-44-5" href="#__codelineno-44-5"></a><span class="w">  </span><span class="nt">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//先修课</span>
<a id="__codelineno-44-6" name="__codelineno-44-6" href="#__codelineno-44-6"></a><span class="w">  </span><span class="nt">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">Double</span><span class="w">  </span><span class="c1">//学分</span>
<a id="__codelineno-44-7" name="__codelineno-44-7" href="#__codelineno-44-7"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-45-1" name="__codelineno-45-1" href="#__codelineno-45-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Course/update HTTP/1.1</span>
<a id="__codelineno-45-2" name="__codelineno-45-2" href="#__codelineno-45-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-45-3" name="__codelineno-45-3" href="#__codelineno-45-3"></a>
<a id="__codelineno-45-4" name="__codelineno-45-4" href="#__codelineno-45-4"></a><span class="p">{</span>
<a id="__codelineno-45-5" name="__codelineno-45-5" href="#__codelineno-45-5"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-45-6" name="__codelineno-45-6" href="#__codelineno-45-6"></a><span class="w">  </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-45-7" name="__codelineno-45-7" href="#__codelineno-45-7"></a><span class="w">  </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-45-8" name="__codelineno-45-8" href="#__codelineno-45-8"></a><span class="w">  </span><span class="nt">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-45-9" name="__codelineno-45-9" href="#__codelineno-45-9"></a><span class="w">  </span><span class="nt">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="mf">3.3</span>
<a id="__codelineno-45-10" name="__codelineno-45-10" href="#__codelineno-45-10"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-46-1" name="__codelineno-46-1" href="#__codelineno-46-1"></a><span class="p">{</span>
<a id="__codelineno-46-2" name="__codelineno-46-2" href="#__codelineno-46-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-46-3" name="__codelineno-46-3" href="#__codelineno-46-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-46-4" name="__codelineno-46-4" href="#__codelineno-46-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-46-5" name="__codelineno-46-5" href="#__codelineno-46-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-46-6" name="__codelineno-46-6" href="#__codelineno-46-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-47-1" name="__codelineno-47-1" href="#__codelineno-47-1"></a><span class="p">{</span>
<a id="__codelineno-47-2" name="__codelineno-47-2" href="#__codelineno-47-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1001</span><span class="p">,</span>
<a id="__codelineno-47-3" name="__codelineno-47-3" href="#__codelineno-47-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;创建失败！&quot;</span><span class="p">,</span>
<a id="__codelineno-47-4" name="__codelineno-47-4" href="#__codelineno-47-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;[SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint failed (UNIQUE constraint failed: Student.no)&quot;</span><span class="p">,</span>
<a id="__codelineno-47-5" name="__codelineno-47-5" href="#__codelineno-47-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<a id="__codelineno-47-6" name="__codelineno-47-6" href="#__codelineno-47-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_13">课程表查</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/Course/getPage">http://my_host:8080/Stu/demo/Course/getPage</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-48-1" name="__codelineno-48-1" href="#__codelineno-48-1"></a><span class="p">{</span>
<a id="__codelineno-48-2" name="__codelineno-48-2" href="#__codelineno-48-2"></a><span class="w">    </span><span class="nt">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="p">,</span><span class="w"> </span><span class="c1">//页码，从0开始</span>
<a id="__codelineno-48-3" name="__codelineno-48-3" href="#__codelineno-48-3"></a><span class="w">    </span><span class="nt">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="w"> </span><span class="c1">//页大小</span>
<a id="__codelineno-48-4" name="__codelineno-48-4" href="#__codelineno-48-4"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-49-1" name="__codelineno-49-1" href="#__codelineno-49-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/Course/getPage HTTP/1.1</span>
<a id="__codelineno-49-2" name="__codelineno-49-2" href="#__codelineno-49-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-49-3" name="__codelineno-49-3" href="#__codelineno-49-3"></a>
<a id="__codelineno-49-4" name="__codelineno-49-4" href="#__codelineno-49-4"></a><span class="p">{</span>
<a id="__codelineno-49-5" name="__codelineno-49-5" href="#__codelineno-49-5"></a><span class="w">    </span><span class="nt">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<a id="__codelineno-49-6" name="__codelineno-49-6" href="#__codelineno-49-6"></a><span class="w">    </span><span class="nt">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span>
<a id="__codelineno-49-7" name="__codelineno-49-7" href="#__codelineno-49-7"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-50-1" name="__codelineno-50-1" href="#__codelineno-50-1"></a><span class="p">{</span>
<a id="__codelineno-50-2" name="__codelineno-50-2" href="#__codelineno-50-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-50-3" name="__codelineno-50-3" href="#__codelineno-50-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-50-4" name="__codelineno-50-4" href="#__codelineno-50-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-50-5" name="__codelineno-50-5" href="#__codelineno-50-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-50-6" name="__codelineno-50-6" href="#__codelineno-50-6"></a><span class="w">    </span><span class="nt">&quot;total&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span>
<a id="__codelineno-50-7" name="__codelineno-50-7" href="#__codelineno-50-7"></a><span class="w">    </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<a id="__codelineno-50-8" name="__codelineno-50-8" href="#__codelineno-50-8"></a><span class="w">      </span><span class="p">{</span>
<a id="__codelineno-50-9" name="__codelineno-50-9" href="#__codelineno-50-9"></a><span class="w">        </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-50-10" name="__codelineno-50-10" href="#__codelineno-50-10"></a><span class="w">        </span><span class="nt">&quot;no&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-50-11" name="__codelineno-50-11" href="#__codelineno-50-11"></a><span class="w">        </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-50-12" name="__codelineno-50-12" href="#__codelineno-50-12"></a><span class="w">        </span><span class="nt">&quot;preNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X103&quot;</span><span class="p">,</span>
<a id="__codelineno-50-13" name="__codelineno-50-13" href="#__codelineno-50-13"></a><span class="w">        </span><span class="nt">&quot;credit&quot;</span><span class="p">:</span><span class="w"> </span><span class="mf">3.3</span>
<a id="__codelineno-50-14" name="__codelineno-50-14" href="#__codelineno-50-14"></a><span class="w">      </span><span class="p">}</span>
<a id="__codelineno-50-15" name="__codelineno-50-15" href="#__codelineno-50-15"></a><span class="w">    </span><span class="p">]</span>
<a id="__codelineno-50-16" name="__codelineno-50-16" href="#__codelineno-50-16"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-50-17" name="__codelineno-50-17" href="#__codelineno-50-17"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-51-1" name="__codelineno-51-1" href="#__codelineno-51-1"></a><span class="p">{</span>
<a id="__codelineno-51-2" name="__codelineno-51-2" href="#__codelineno-51-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-51-3" name="__codelineno-51-3" href="#__codelineno-51-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-51-4" name="__codelineno-51-4" href="#__codelineno-51-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-51-5" name="__codelineno-51-5" href="#__codelineno-51-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-51-6" name="__codelineno-51-6" href="#__codelineno-51-6"></a><span class="w">    </span><span class="nt">&quot;total&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-51-7" name="__codelineno-51-7" href="#__codelineno-51-7"></a><span class="w">    </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span>
<a id="__codelineno-51-8" name="__codelineno-51-8" href="#__codelineno-51-8"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-51-9" name="__codelineno-51-9" href="#__codelineno-51-9"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h2 id="_14">学生选课表</h2>
<h3 id="_15">学生选课表增</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/StuCourse/add">http://my_host:8080/Stu/demo/StuCourse/add</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-52-1" name="__codelineno-52-1" href="#__codelineno-52-1"></a><span class="p">{</span>
<a id="__codelineno-52-2" name="__codelineno-52-2" href="#__codelineno-52-2"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//Id</span>
<a id="__codelineno-52-3" name="__codelineno-52-3" href="#__codelineno-52-3"></a><span class="w">  </span><span class="nt">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//课程号</span>
<a id="__codelineno-52-4" name="__codelineno-52-4" href="#__codelineno-52-4"></a><span class="w">  </span><span class="nt">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//学号</span>
<a id="__codelineno-52-5" name="__codelineno-52-5" href="#__codelineno-52-5"></a><span class="w">  </span><span class="nt">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">Double</span><span class="w">  </span><span class="c1">//成绩</span>
<a id="__codelineno-52-6" name="__codelineno-52-6" href="#__codelineno-52-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-53-1" name="__codelineno-53-1" href="#__codelineno-53-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/StuCourse/add HTTP/1.1</span>
<a id="__codelineno-53-2" name="__codelineno-53-2" href="#__codelineno-53-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-53-3" name="__codelineno-53-3" href="#__codelineno-53-3"></a>
<a id="__codelineno-53-4" name="__codelineno-53-4" href="#__codelineno-53-4"></a><span class="p">{</span>
<a id="__codelineno-53-5" name="__codelineno-53-5" href="#__codelineno-53-5"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-53-6" name="__codelineno-53-6" href="#__codelineno-53-6"></a><span class="w">  </span><span class="nt">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-53-7" name="__codelineno-53-7" href="#__codelineno-53-7"></a><span class="w">  </span><span class="nt">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-53-8" name="__codelineno-53-8" href="#__codelineno-53-8"></a><span class="w">  </span><span class="nt">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="mf">3.3</span>
<a id="__codelineno-53-9" name="__codelineno-53-9" href="#__codelineno-53-9"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-54-1" name="__codelineno-54-1" href="#__codelineno-54-1"></a><span class="p">{</span>
<a id="__codelineno-54-2" name="__codelineno-54-2" href="#__codelineno-54-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-54-3" name="__codelineno-54-3" href="#__codelineno-54-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-54-4" name="__codelineno-54-4" href="#__codelineno-54-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-54-5" name="__codelineno-54-5" href="#__codelineno-54-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-54-6" name="__codelineno-54-6" href="#__codelineno-54-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-55-1" name="__codelineno-55-1" href="#__codelineno-55-1"></a><span class="p">{</span>
<a id="__codelineno-55-2" name="__codelineno-55-2" href="#__codelineno-55-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1001</span><span class="p">,</span>
<a id="__codelineno-55-3" name="__codelineno-55-3" href="#__codelineno-55-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;创建失败！&quot;</span><span class="p">,</span>
<a id="__codelineno-55-4" name="__codelineno-55-4" href="#__codelineno-55-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;[SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint failed (UNIQUE constraint failed: Student.no)&quot;</span><span class="p">,</span>
<a id="__codelineno-55-5" name="__codelineno-55-5" href="#__codelineno-55-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<a id="__codelineno-55-6" name="__codelineno-55-6" href="#__codelineno-55-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_16">学生选课表删</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/StuCourse/delete">http://my_host:8080/Stu/demo/StuCourse/delete</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-56-1" name="__codelineno-56-1" href="#__codelineno-56-1"></a><span class="p">[</span><span class="s2">&quot;id1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;id2&quot;</span><span class="p">]</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-57-1" name="__codelineno-57-1" href="#__codelineno-57-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/StuCourse/delete HTTP/1.1</span>
<a id="__codelineno-57-2" name="__codelineno-57-2" href="#__codelineno-57-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-57-3" name="__codelineno-57-3" href="#__codelineno-57-3"></a>
<a id="__codelineno-57-4" name="__codelineno-57-4" href="#__codelineno-57-4"></a><span class="p">[</span><span class="s2">&quot;1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;2&quot;</span><span class="p">]</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-58-1" name="__codelineno-58-1" href="#__codelineno-58-1"></a><span class="p">{</span>
<a id="__codelineno-58-2" name="__codelineno-58-2" href="#__codelineno-58-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-58-3" name="__codelineno-58-3" href="#__codelineno-58-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-58-4" name="__codelineno-58-4" href="#__codelineno-58-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-58-5" name="__codelineno-58-5" href="#__codelineno-58-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-58-6" name="__codelineno-58-6" href="#__codelineno-58-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-59-1" name="__codelineno-59-1" href="#__codelineno-59-1"></a><span class="p">{</span>
<a id="__codelineno-59-2" name="__codelineno-59-2" href="#__codelineno-59-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-59-3" name="__codelineno-59-3" href="#__codelineno-59-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-59-4" name="__codelineno-59-4" href="#__codelineno-59-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-59-5" name="__codelineno-59-5" href="#__codelineno-59-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="c1">//影响行数为0</span>
<a id="__codelineno-59-6" name="__codelineno-59-6" href="#__codelineno-59-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_17">学生选课表改</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/StuCourse/update">http://my_host:8080/Stu/demo/StuCourse/update</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-60-1" name="__codelineno-60-1" href="#__codelineno-60-1"></a><span class="p">{</span>
<a id="__codelineno-60-2" name="__codelineno-60-2" href="#__codelineno-60-2"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//Id</span>
<a id="__codelineno-60-3" name="__codelineno-60-3" href="#__codelineno-60-3"></a><span class="w">  </span><span class="nt">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//课程号</span>
<a id="__codelineno-60-4" name="__codelineno-60-4" href="#__codelineno-60-4"></a><span class="w">  </span><span class="nt">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">S</span><span class="kc">tr</span><span class="err">i</span><span class="kc">n</span><span class="err">g</span><span class="p">,</span><span class="w">  </span><span class="c1">//学号</span>
<a id="__codelineno-60-5" name="__codelineno-60-5" href="#__codelineno-60-5"></a><span class="w">  </span><span class="nt">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">Double</span><span class="w">  </span><span class="c1">//成绩</span>
<a id="__codelineno-60-6" name="__codelineno-60-6" href="#__codelineno-60-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-61-1" name="__codelineno-61-1" href="#__codelineno-61-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/StuCourse/update HTTP/1.1</span>
<a id="__codelineno-61-2" name="__codelineno-61-2" href="#__codelineno-61-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-61-3" name="__codelineno-61-3" href="#__codelineno-61-3"></a>
<a id="__codelineno-61-4" name="__codelineno-61-4" href="#__codelineno-61-4"></a><span class="p">{</span>
<a id="__codelineno-61-5" name="__codelineno-61-5" href="#__codelineno-61-5"></a><span class="w">  </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-61-6" name="__codelineno-61-6" href="#__codelineno-61-6"></a><span class="w">  </span><span class="nt">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-61-7" name="__codelineno-61-7" href="#__codelineno-61-7"></a><span class="w">  </span><span class="nt">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-61-8" name="__codelineno-61-8" href="#__codelineno-61-8"></a><span class="w">  </span><span class="nt">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="mf">3.3</span>
<a id="__codelineno-61-9" name="__codelineno-61-9" href="#__codelineno-61-9"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-62-1" name="__codelineno-62-1" href="#__codelineno-62-1"></a><span class="p">{</span>
<a id="__codelineno-62-2" name="__codelineno-62-2" href="#__codelineno-62-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-62-3" name="__codelineno-62-3" href="#__codelineno-62-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-62-4" name="__codelineno-62-4" href="#__codelineno-62-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-62-5" name="__codelineno-62-5" href="#__codelineno-62-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span>
<a id="__codelineno-62-6" name="__codelineno-62-6" href="#__codelineno-62-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-63-1" name="__codelineno-63-1" href="#__codelineno-63-1"></a><span class="p">{</span>
<a id="__codelineno-63-2" name="__codelineno-63-2" href="#__codelineno-63-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1001</span><span class="p">,</span>
<a id="__codelineno-63-3" name="__codelineno-63-3" href="#__codelineno-63-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;创建失败！&quot;</span><span class="p">,</span>
<a id="__codelineno-63-4" name="__codelineno-63-4" href="#__codelineno-63-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;[SQLITE_CONSTRAINT_UNIQUE] A UNIQUE constraint failed (UNIQUE constraint failed: Student.no)&quot;</span><span class="p">,</span>
<a id="__codelineno-63-5" name="__codelineno-63-5" href="#__codelineno-63-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span>
<a id="__codelineno-63-6" name="__codelineno-63-6" href="#__codelineno-63-6"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
<h3 id="_18">学生选课表查</h3>
<p><strong>调用地址：</strong> <a href="http://my_host:8080/Stu/demo/StuCourse/getPage">http://my_host:8080/Stu/demo/StuCourse/getPage</a></p>
<p><strong>请求方式：</strong> POST</p>
<p><strong>返回类型：</strong> JSON</p>
<p><strong>请求参数（Headers）</strong></p>
<table>
<thead>
<tr>
<th>参数</th>
<th>值</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-type</td>
<td>application/json</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Query）</strong></p>
<p><strong>请求参数（Body）</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-64-1" name="__codelineno-64-1" href="#__codelineno-64-1"></a><span class="p">{</span>
<a id="__codelineno-64-2" name="__codelineno-64-2" href="#__codelineno-64-2"></a><span class="w">    </span><span class="nt">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="p">,</span><span class="w"> </span><span class="c1">//页码，从0开始</span>
<a id="__codelineno-64-3" name="__codelineno-64-3" href="#__codelineno-64-3"></a><span class="w">    </span><span class="nt">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="err">I</span><span class="kc">nte</span><span class="err">ger</span><span class="w"> </span><span class="c1">//页大小</span>
<a id="__codelineno-64-4" name="__codelineno-64-4" href="#__codelineno-64-4"></a><span class="p">}</span>
</code></pre></div>
<p><strong>请求示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-65-1" name="__codelineno-65-1" href="#__codelineno-65-1"></a><span class="err">POST</span><span class="w"> </span><span class="err">h</span><span class="kc">tt</span><span class="err">p</span><span class="p">:</span><span class="c1">//localhost:8080/Stu/demo/StuCourse/getPage HTTP/1.1</span>
<a id="__codelineno-65-2" name="__codelineno-65-2" href="#__codelineno-65-2"></a><span class="err">co</span><span class="kc">ntent</span><span class="mi">-</span><span class="kc">t</span><span class="err">ype</span><span class="p">:</span><span class="w"> </span><span class="err">applica</span><span class="kc">t</span><span class="err">io</span><span class="kc">n</span><span class="err">/jso</span><span class="kc">n</span>
<a id="__codelineno-65-3" name="__codelineno-65-3" href="#__codelineno-65-3"></a>
<a id="__codelineno-65-4" name="__codelineno-65-4" href="#__codelineno-65-4"></a><span class="p">{</span>
<a id="__codelineno-65-5" name="__codelineno-65-5" href="#__codelineno-65-5"></a><span class="w">    </span><span class="nt">&quot;pageNum&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span>
<a id="__codelineno-65-6" name="__codelineno-65-6" href="#__codelineno-65-6"></a><span class="w">    </span><span class="nt">&quot;pageSize&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">5</span>
<a id="__codelineno-65-7" name="__codelineno-65-7" href="#__codelineno-65-7"></a><span class="p">}</span>
</code></pre></div>
<blockquote>
<p>Rest Client请求格式</p>
</blockquote>
<p><strong>正常返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-66-1" name="__codelineno-66-1" href="#__codelineno-66-1"></a><span class="p">{</span>
<a id="__codelineno-66-2" name="__codelineno-66-2" href="#__codelineno-66-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-66-3" name="__codelineno-66-3" href="#__codelineno-66-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-66-4" name="__codelineno-66-4" href="#__codelineno-66-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-66-5" name="__codelineno-66-5" href="#__codelineno-66-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-66-6" name="__codelineno-66-6" href="#__codelineno-66-6"></a><span class="w">    </span><span class="nt">&quot;total&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span>
<a id="__codelineno-66-7" name="__codelineno-66-7" href="#__codelineno-66-7"></a><span class="w">    </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<a id="__codelineno-66-8" name="__codelineno-66-8" href="#__codelineno-66-8"></a><span class="w">      </span><span class="p">{</span>
<a id="__codelineno-66-9" name="__codelineno-66-9" href="#__codelineno-66-9"></a><span class="w">        </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X100&quot;</span><span class="p">,</span>
<a id="__codelineno-66-10" name="__codelineno-66-10" href="#__codelineno-66-10"></a><span class="w">        </span><span class="nt">&quot;courseNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X101&quot;</span><span class="p">,</span>
<a id="__codelineno-66-11" name="__codelineno-66-11" href="#__codelineno-66-11"></a><span class="w">        </span><span class="nt">&quot;stuNo&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;X102&quot;</span><span class="p">,</span>
<a id="__codelineno-66-12" name="__codelineno-66-12" href="#__codelineno-66-12"></a><span class="w">        </span><span class="nt">&quot;grade&quot;</span><span class="p">:</span><span class="w"> </span><span class="mf">3.3</span>
<a id="__codelineno-66-13" name="__codelineno-66-13" href="#__codelineno-66-13"></a><span class="w">      </span><span class="p">}</span>
<a id="__codelineno-66-14" name="__codelineno-66-14" href="#__codelineno-66-14"></a><span class="w">    </span><span class="p">]</span>
<a id="__codelineno-66-15" name="__codelineno-66-15" href="#__codelineno-66-15"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-66-16" name="__codelineno-66-16" href="#__codelineno-66-16"></a><span class="p">}</span>
</code></pre></div>
<p><strong>失败返回示例</strong></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-67-1" name="__codelineno-67-1" href="#__codelineno-67-1"></a><span class="p">{</span>
<a id="__codelineno-67-2" name="__codelineno-67-2" href="#__codelineno-67-2"></a><span class="w">  </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-67-3" name="__codelineno-67-3" href="#__codelineno-67-3"></a><span class="w">  </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;操作成功！&quot;</span><span class="p">,</span>
<a id="__codelineno-67-4" name="__codelineno-67-4" href="#__codelineno-67-4"></a><span class="w">  </span><span class="nt">&quot;detail&quot;</span><span class="p">:</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span>
<a id="__codelineno-67-5" name="__codelineno-67-5" href="#__codelineno-67-5"></a><span class="w">  </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<a id="__codelineno-67-6" name="__codelineno-67-6" href="#__codelineno-67-6"></a><span class="w">    </span><span class="nt">&quot;total&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span>
<a id="__codelineno-67-7" name="__codelineno-67-7" href="#__codelineno-67-7"></a><span class="w">    </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span>
<a id="__codelineno-67-8" name="__codelineno-67-8" href="#__codelineno-67-8"></a><span class="w">  </span><span class="p">}</span>
<a id="__codelineno-67-9" name="__codelineno-67-9" href="#__codelineno-67-9"></a><span class="p">}</span>
</code></pre></div>
<p><strong>错误码定义</strong></p>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>成功</td>
<td></td>
</tr>
</tbody>
</table>
<hr />
</details>





                
              </article>
            </div>
          
          
  <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var tab,labels=set.querySelector(".tabbed-labels");for(tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>

        </div>
        
      </main>
      
        <footer class="md-footer">
  
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-copyright">
  
  
    Made with
    <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
      Material for MkDocs
    </a>
  
</div>
      
    </div>
  </div>
</footer>
      
    </div>
    <div class="md-dialog" data-md-component="dialog">
      <div class="md-dialog__inner md-typeset"></div>
    </div>
    
    <script id="__config" type="application/json">{"base": "../..", "features": ["content.tabs.link", "navigation.expand", "navigation.sections", "navigation.path"], "search": "../../assets/javascripts/workers/search.208ed371.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
    
    
      <script src="../../assets/javascripts/bundle.efa0ade1.min.js"></script>
      
    
  </body>
</html>